Skip to content

Commit

Permalink
bug #810 [CI] Exclude builds for Symfony 6.4 and doctrine/persistence…
Browse files Browse the repository at this point in the history
… 2.0 (GSadee, loic425)

This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | after #809 
| License         | MIT

Fix after upmerge

Commits
-------

1983dc7 [CI] Exclude builds for Symfony 6.4 and doctrine/persistence 2.0
891cdf4 Fix PHPUnit tests
  • Loading branch information
GSadee authored Dec 6, 2023
2 parents a0f0abe + 891cdf4 commit f1f47fd
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
- php: "8.2"
collections: "^2.0"
persistence: "^2.0"
- persistence: "^2.0"
symfony: "~6.4.0"

steps:
-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace App\Tests\Controller;

use ApiTestCase\JsonApiTestCase;
use App\Kernel;
use Coduo\PHPMatcher\Backtrace\VoidBacktrace;
use Coduo\PHPMatcher\Matcher;
use Symfony\Component\HttpFoundation\Response;
Expand Down Expand Up @@ -71,7 +72,9 @@ public function it_does_not_allow_to_create_a_subscription_if_there_is_a_validat

$this->client->request('POST', '/ajax/subscriptions', [], [], ['CONTENT_TYPE' => 'application/json'], $data);

$this->assertResponse($this->client->getResponse(), 'subscriptions/create_validation', Response::HTTP_UNPROCESSABLE_ENTITY);
$file = Kernel::VERSION_ID >= 60400 ? 'subscriptions/create_validation' : 'subscriptions/create_validation_legacy';

$this->assertResponse($this->client->getResponse(), $file, Response::HTTP_UNPROCESSABLE_ENTITY);
}

/** @test */
Expand Down Expand Up @@ -105,7 +108,9 @@ public function it_does_not_allow_to_update_a_subscription_if_there_is_a_validat

$this->client->request('PUT', '/ajax/subscriptions/' . $subscriptions['subscription_marty']->getId(), [], [], ['CONTENT_TYPE' => 'application/json'], $data);

$this->assertResponse($this->client->getResponse(), 'subscriptions/update_validation', Response::HTTP_UNPROCESSABLE_ENTITY);
$file = Kernel::VERSION_ID >= 60400 ? 'subscriptions/update_validation' : 'subscriptions/update_validation_legacy';

$this->assertResponse($this->client->getResponse(), $file, Response::HTTP_UNPROCESSABLE_ENTITY);
}

/** @test */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace App\Tests\Controller;

use App\Kernel;
use Coduo\PHPMatcher\Backtrace\VoidBacktrace;
use Coduo\PHPMatcher\Matcher;
use Symfony\Component\HttpFoundation\Response;
Expand Down Expand Up @@ -70,7 +71,9 @@ public function it_does_not_allow_to_create_a_subscription_if_there_is_a_validat

$this->client->request(method: 'POST', uri: '/ajax/subscriptions', server: self::$headersWithContentType, content: $data);

$this->assertResponse($this->client->getResponse(), 'subscriptions/create_validation', Response::HTTP_UNPROCESSABLE_ENTITY);
$file = Kernel::VERSION_ID >= 60400 ? 'subscriptions/create_validation' : 'subscriptions/create_validation_legacy';

$this->assertResponse($this->client->getResponse(), $file, Response::HTTP_UNPROCESSABLE_ENTITY);
}

/** @test */
Expand Down Expand Up @@ -104,7 +107,9 @@ public function it_does_not_allow_to_update_a_subscription_if_there_is_a_validat

$this->client->request(method: 'PUT', uri: '/ajax/subscriptions/' . $subscriptions['subscription_marty']->getId(), server: self::$headersWithContentType, content: $data);

$this->assertResponse($this->client->getResponse(), 'subscriptions/update_validation', Response::HTTP_UNPROCESSABLE_ENTITY);
$file = Kernel::VERSION_ID >= 60400 ? 'subscriptions/update_validation' : 'subscriptions/update_validation_legacy';

$this->assertResponse($this->client->getResponse(), $file, Response::HTTP_UNPROCESSABLE_ENTITY);
}

/** @test */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{
"propertyPath": "email",
"title": "This value should not be blank.",
"template": "This value should not be blank.",
"parameters": {
"{{ value }}": "\"\""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<violations>
<propertyPath>email</propertyPath>
<title>This value should not be blank.</title>
<template>This value should not be blank.</template>
<parameters>
<item key="{{ value }}">""</item>
</parameters>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "https://symfony.com/errors/validation",
"title": "Validation Failed",
"detail": "email: This value should not be blank.",
"violations": [
{
"propertyPath": "email",
"title": "This value should not be blank.",
"parameters": {
"{{ value }}": "\"\""
},
"type": "urn:uuid:c1051bb4-d103-4f74-8988-acbcafc7fdc3"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<response>
<type>https://symfony.com/errors/validation</type>
<title>Validation Failed</title>
<detail>email: This value should not be blank.</detail>
<violations>
<propertyPath>email</propertyPath>
<title>This value should not be blank.</title>
<parameters>
<item key="{{ value }}">""</item>
</parameters>
<type>urn:uuid:c1051bb4-d103-4f74-8988-acbcafc7fdc3</type>
</violations>
</response>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{
"propertyPath": "email",
"title": "This value should not be blank.",
"template": "This value should not be blank.",
"parameters": {
"{{ value }}": "\"\""
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<violations>
<propertyPath>email</propertyPath>
<title>This value should not be blank.</title>
<template>This value should not be blank.</template>
<parameters>
<item key="{{ value }}">""</item>
</parameters>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "https://symfony.com/errors/validation",
"title": "Validation Failed",
"detail": "email: This value should not be blank.",
"violations": [
{
"propertyPath": "email",
"title": "This value should not be blank.",
"parameters": {
"{{ value }}": "\"\""
},
"type": "urn:uuid:c1051bb4-d103-4f74-8988-acbcafc7fdc3"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<response>
<type>https://symfony.com/errors/validation</type>
<title>Validation Failed</title>
<detail>email: This value should not be blank.</detail>
<violations>
<propertyPath>email</propertyPath>
<title>This value should not be blank.</title>
<parameters>
<item key="{{ value }}">""</item>
</parameters>
<type>urn:uuid:c1051bb4-d103-4f74-8988-acbcafc7fdc3</type>
</violations>
</response>

0 comments on commit f1f47fd

Please sign in to comment.