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

Allow installing on PHP 8 #255

Merged
merged 4 commits into from
Oct 6, 2020
Merged

Allow installing on PHP 8 #255

merged 4 commits into from
Oct 6, 2020

Conversation

andypost
Copy link
Contributor

@andypost andypost commented Sep 5, 2020

Q A
Branch? "master"
Bug fix? no
New feature? yes
BC breaks? yes/no
Deprecations? yes/no
Fixed tickets comma-separated list of tickets fixed by the PR, if any
License MIT
Doc PR reference to the documentation PR, if any

@andypost
Copy link
Contributor Author

andypost commented Sep 5, 2020

Locally on phpunit 9 and php 8 beta3 as ter patches I'm getting

make test

+++ run unit tests +++
PHPUnit 9.3.8 by Sebastian Bergmann and contributors.

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Testing 
.R...W..................................W................SSS...  63 / 130 ( 48%)
..S..............S................................WWWWWWW...... 126 / 130 ( 96%)
....                                                            130 / 130 (100%)

Time: 00:00.165, Memory: 8.00 MB

There were 9 warnings:

1) Symfony\Cmf\Component\Routing\Tests\Unit\DependencyInjection\Compiler\RegisterRouteEnhancersPassTest::testRouteEnhancerPass
The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.

2) Symfony\Cmf\Component\Routing\Tests\Routing\ChainRouterTest::testReSortRouters
The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.

3) Symfony\Cmf\Component\Routing\PagedRouteCollectionTest::testIterator with data set #0 (0, 20, array(array(0, 20)))
The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.

4) Symfony\Cmf\Component\Routing\PagedRouteCollectionTest::testIterator with data set #1 (10, 20, array(array(0, 20)))
The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.

5) Symfony\Cmf\Component\Routing\PagedRouteCollectionTest::testIterator with data set #2 (20, 20, array(array(0, 20), array(20, 20)))
The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.

6) Symfony\Cmf\Component\Routing\PagedRouteCollectionTest::testIterator with data set #3 (39, 20, array(array(0, 20), array(20, 20)))
The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.

7) Symfony\Cmf\Component\Routing\PagedRouteCollectionTest::testIterator with data set #4 (40, 20, array(array(0, 20), array(20, 20), array(40, 20)))
The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.

8) Symfony\Cmf\Component\Routing\PagedRouteCollectionTest::testIterator with data set #5 (41, 20, array(array(0, 20), array(20, 20), array(40, 20)))
The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.

9) Symfony\Cmf\Component\Routing\PagedRouteCollectionTest::testIterator with data set #6 (42, 23, array(array(0, 23), array(23, 23)))
The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.

--

There was 1 risky test:

1) Symfony\Cmf\Component\Routing\Tests\Unit\Candidates\CandidatesTest::testRestrictQuery
This test did not perform any assertions

/srv/tests/Unit/Candidates/CandidatesTest.php:33

WARNINGS!
Tests: 130, Assertions: 681, Warnings: 9, Skipped: 5, Risky: 1.

Remaining direct deprecation notices (1)

  1x: The "Symfony\Cmf\Component\Routing\ChainRouteCollection::add()" method will require a new "int $priority" argument in the next major version of its parent class "Symfony\Component\Routing\RouteCollection", not defining it is deprecated.
    1x in ChainRouterTest::testRouteCollection from Symfony\Cmf\Component\Routing\Tests\Routing

Remaining indirect deprecation notices (1)

  1x: Since symfony/event-dispatcher 5.1: Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy is deprecated, use the event dispatcher without the proxy.
    1x in DynamicRouterTest::setUp from Symfony\Cmf\Component\Routing\Tests\Routing

Legacy deprecation notices (6)

Other deprecation notices (1)

  1x: The Symfony\Cmf\Component\Routing\VersatileGeneratorInterface::supports method is deprecated (This method is deprecated since version 2.3 and will be removed in version 3.O.  This method was used to not call generators that can not handle objects in $name. With Symfony 5, this becomes obsolete as the strict type declaration prevents passing anything else than a string as $name.).
    1x in ChainRouterTest::testGenerateWithObjectNameInParametersNotFoundVersatile from Symfony\Cmf\Component\Routing\Tests\Routing

make: *** [vendor/symfony-cmf/testing/bin/make/unit_tests.mk:5: unit_tests] Error 1

@andypost
Copy link
Contributor Author

andypost commented Sep 5, 2020

Another compatibility fix in separate #256

@dbu
Copy link
Member

dbu commented Sep 10, 2020

i have just merged #256, please rebase this branch ;-)

@ausi ausi mentioned this pull request Sep 10, 2020
42 tasks
@andypost
Copy link
Contributor Author

andypost commented Oct 3, 2020

After changing travis to nightly tests started to work

New issues

@andypost
Copy link
Contributor Author

andypost commented Oct 3, 2020

Filed #259 for TestCase::at()

@andypost
Copy link
Contributor Author

andypost commented Oct 3, 2020

The remaining one is related to sebastianbergmann/phpunit#4373
Looks phpunit should be 9.3 to pass on php 8 sebastianbergmann/phpunit#4325

.travis.yml Show resolved Hide resolved
@dbu
Copy link
Member

dbu commented Oct 5, 2020

great, this is green now! i wonder if we want to merge with php 8 nightly, or wait for a stable php 8 to be released first? as the nightly is only in the travis configuration it has no effect on consumers, so i would be ok to merge it now. wdyt @andypost ?

Copy link
Member

@dbu dbu left a comment

Choose a reason for hiding this comment

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

as the build is green with nightly, i think it is safe enough that this package supports php 8, even if the dependencies are not yet ready

@dbu dbu merged commit 97c7633 into symfony-cmf:master Oct 6, 2020
@dbu
Copy link
Member

dbu commented Oct 6, 2020

i tagged https://github.com/symfony-cmf/Routing/releases/tag/2.3.3, thanks a lot!

@andypost andypost deleted the php8 branch October 6, 2020 10:21
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.

None yet

2 participants