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
[FrameworkBundle][BC Break ?] Accessing static property $client in classes extending WebTestCase #31653
Comments
I also have this same problem with the full version 4.3.0. |
I am not sure if the WebTestCase should be under the BC promise https://symfony.com/doc/current/contributing/code/bc.html Theoritically it is not.. never the less I believe that this specific class it is extended by a LOT a LOT people and it makes their update path a little bit difficult. For me I have to update a gazillion of I can not see the reason why the client was added there... |
Or if the client is really required there, the name can be changed to |
@fabpot This might require your attention as Symfony 4.3.0 has just been released with this? |
Since the |
@gmponos The doc states :
But |
It is covered by the BC promise. But it also states that we may add new properties to a class. We rather need to discuss if we should use another name in this particular case to mitigate the impact. |
Ah... a small |
I already updated, but IMHO this should be treated as a BC Break and either be reverted or a new property with another name should be added to not break the existing. We can add new property but this is way to impacting to not be treated as a BC. |
See #31880 |
…tionsTrait (nicolas-grekas) This PR was merged into the 4.3 branch. Discussion ---------- [FrameworkBundle] fix BC-breaking property in WebTestAssertionsTrait | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #31653 | License | MIT | Doc PR | - No properties should be exposed. Commits ------- 6253926 [FrameworkBundle] fix BC-breaking property in WebTestAssertionsTrait
I had similar issues, rewrote half my test suite to accomodate for the 4.3.0 changes and rename |
Symfony version(s) affected: 4.3.0-BETA2
Description
In symfony/framework-bundle@58e572e,
protected static $client;
was added to\Symfony\Bundle\FrameworkBundle\Test\WebTestCase
.I've upgraded my project to Symfony 4.3.0-BETA2 and had to fix my test suite and that of already multiple different libraries because it used
$this->client
to access the client (which is now triggering errors likeAccessing static property Craue\FormFlowBundle\Tests\RevalidatePreviousStepsFlowTest::$client as non static
, when it used to "work" before).How to reproduce
Clone https://github.com/craue/CraueFormFlowBundle on branch "autoconfiguration" and run
composer install && vendor/bin/phpunit
.Possible Solution
Either revert the addition, or write documentation as I think it's a BC break of sorts.
The text was updated successfully, but these errors were encountered: