Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for laravel 10 #11

Closed
wants to merge 4 commits into from
Closed

Add support for laravel 10 #11

wants to merge 4 commits into from

Conversation

philsturgeon
Copy link
Contributor

@philsturgeon philsturgeon commented Sep 26, 2023

Closes #10
Replaces #7

  • Update PHPUnit to ^10.0
  • Migrate PHPUnit configuration
  • Fix PHPUnit deprecations
  • Update test annotations to attributes
  • upgrade to laravel v10 and membrane v0.3

@philsturgeon philsturgeon changed the title laravel 10 Add support for laravel 10 Sep 26, 2023
"nyholm/psr7": "^1.5",
"membrane/membrane": "^0.2.0",
"membrane/membrane": "^0.3.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried upgrading to latest membrane-core (0.6.2) but was getting errors, and 0.3.0 was the highest I could go with passing tests.

Time: 00:00.047, Memory: 12.00 MB

There were 2 PHPUnit errors:

1) Membrane\Laravel\ApiProblemBuilderTest::buildFromExceptionTest
The data provider specified for Membrane\Laravel\ApiProblemBuilderTest::buildFromExceptionTest is invalid
Class "Membrane\OpenAPI\Exception\CannotProcessRequest" not found

/Users/phil/src/membrane-laravel/tests/ApiProblemBuilderTest.php:98

2) Membrane\Laravel\Middleware\RequestValidationTest::catchesCannotProcessRequest
The data provider specified for Membrane\Laravel\Middleware\RequestValidationTest::catchesCannotProcessRequest is invalid
Class "Membrane\OpenAPI\Exception\CannotProcessRequest" not found

/Users/phil/src/membrane-laravel/tests/Middleware/RequestValidationTest.php:72

--

There was 1 failure:

1) Membrane\Laravel\Middleware\RequestValidationTest::registersResultInstanceInContainer
Expectation failed for method name is "instance" when invoked 1 time
Parameter 1 for invocation Illuminate\Contracts\Container\Container::instance('Membrane\Result\Result', Membrane\Result\Result Object (...)) does not match expected value.
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
         'header' => []
         'cookie' => []
         'body' => ''
+        'request' => [...]
     )
     'result' => 1
 )

/Users/phil/src/membrane-laravel/src/Middleware/RequestValidation.php:44
/Users/phil/src/membrane-laravel/tests/Middleware/RequestValidationTest.php:49

--

There was 1 risky test:

1) Membrane\Laravel\Middleware\RequestValidationTest::registersResultInstanceInContainer
This test did not perform any assertions

/Users/phil/src/membrane-laravel/tests/Middleware/RequestValidationTest.php:30

ERRORS!
Tests: 8, Assertions: 18, Errors: 2, Failures: 1, Risky: 1.

@charjr
Copy link
Collaborator

charjr commented Sep 26, 2023

@philsturgeon Apologies, I've butchered your PR a bit but I've added the changes.

I'll see if I can get membrane version .6 working as well

@charjr charjr closed this Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Laravel 10
2 participants