Comments (6)
FIxed in 1b66d8e
from phpstan-symfony.
Actually it wasn't, I completely screwed that up. @aturki can you show me what parameters (especially the first one) are you calling createForm
with, your FormType class, and anything else you feel I could need? Thanks.
from phpstan-symfony.
Hi @lookyman, createForm
is called as:
$this->createFormat(DocumentType::class, $entity, $parameters);
Note the DocumentType
is a subclass of the Symfony standard Symfony\Component\Form\AbstractType
Let me know if you need extra infos ;)
from phpstan-symfony.
I think it's no false positive, but something ugly in the Form component:
The FormInterface
returned by the builder does not include the getClickedButton()
method which is part of the Form
class. So phpstan would have to inspect the returned form object.
from phpstan-symfony.
I opened a ticket for this at Symfony, see symfony/symfony#35277
from phpstan-symfony.
For now, the solution is to add a PHPDoc - see symfony/symfony#35277 (comment) :
use Symfony\Component\Form\Form;
/** @var Form $form */
$button = $form->getClickedButton();
from phpstan-symfony.
Related Issues (20)
- checkUninitializedProperties does not consider @required HOT 7
- Stubs overruling actual interface ? HOT 2
- `Form` is not subtype of native type `FormInterface` HOT 2
- Missing array as an available return type for InputBag::get() HOT 2
- Detection of invalid route names (and perhaps even missing/invalid params)
- `Required` attribute should remove readonly properties errors HOT 8
- Template type TData on class Symfony\Component\Form\FormInterface is not covariant HOT 1
- The constant_hassers not working as constantHassers default of extension.neon always used
- Support Symfony Validator HOT 6
- Method MyVoter::supports() has parameter $attribute with no type specified HOT 5
- Narrow property types in validated objects HOT 2
- Take into account the dynamic Kernel class HOT 16
- Request::getContent() return value without asResource is not always a string HOT 2
- Form "has invalid type Symfony\Component\Form\TData" after patch upgrade
- [Feature Request] Enforce `ResetInterface` on non-read-only services HOT 2
- PHPstan does not find container helper functions used on packages php configs HOT 5
- Remove reporting of deprecated method calls in tests flagged as `@group legacy` HOT 4
- Rule Idea: UriSigner check result is used and not used as a void method HOT 2
- Class or interface 'PHPStan\Symfony\ServiceMapFactory' not found. HOT 1
- wrong asumption about `InputInterface::getArgument()` return type in `interact()` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpstan-symfony.