liip / liip/LiipFunctionalTestBundle
WebTestCase and FixturesTrait define the same property ($containers)
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 648
- Forks
- 179
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to upgrade my app to Symfony 5.3. Previously this worked in 5.2.11 with functional-test-bundle 4.4.0 and test-fixtures-bundle 1.11.2. After upgrading to most recent versions of all, I get the error below:
`PHP Fatal error: Liip\FunctionalTestBundle\Test\WebTestCase and Liip\TestFixturesBundle\Test\FixturesTrait define the same property ($containers) in the composition of App\Tests\AbstractFixtureWebTestCase. However, the definition differs and is considered incompatible. Class was composed in /var/www/symfony/tests/AbstractFixtureWebTestCase.php on line 14`
This is the same error as #548 but obviously - much more recent versions.
### Preconditions
1. PHP 7.4.22
2. Symfony 5.3.4
2. liip/functional-test-bundle 4.4.2
3. liip/test-fixtures-bundle 1.12.0
### Steps to reproduce
```php
namespace App\Tests;
use Liip\FunctionalTestBundle\Test\WebTestCase;
use Liip\TestFixturesBundle\Test\FixturesTrait;
abstract class AbstractFixtureWebTestCase extends WebTestCase
{
use FixturesTrait;
```
### Expected result
1. these two bundles should work together as before
### Actual result
`PHP Fatal error: Liip\FunctionalTestBundle\Test\WebTestCase and Liip\TestFixturesBundle\Test\FixturesTrait define the same property ($containers) in the composition of App\Tests\AbstractFixtureWebTestCase. However, the definition differs and is considered incompatible. Class was composed in /var/www/symfony/tests/AbstractFixtureWebTestCase.php on line 14`
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the composition in tests/AbstractFixtureWebTestCase.php and inspect the $containers definitions in Liip\FunctionalTestBundle\Test\WebTestCase and Liip\TestFixturesBundle\Test\FixturesTrait. Reproduce the PHP fatal error with the listed Symfony and bundle versions, then verify that the two test helpers compose without an incompatible property definition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100