Comments (7)
Targetting 5.2 is fine for this particular enhancement, it's not changing the functional behaviour of any classes.
Means you'll get your patch release immediately instead of having to wait several months.
from silverstripe-framework.
Closing because this is an issue with PHPStorm, not with Silverstripe
The type hinting works correctly in VSCode, at least with the PHP Intelephense plugin - with the example above I was correctly type hinted for a Member. Type hinting was greatly improved in 5.2 with generic type hints
from silverstripe-framework.
@emteknetnz I don't understand this stance? I agree that 5.2 is a huge improvement, and was running my own stubs with generic type hints before 5.2. But the reason for adding the generic type hints is to improve dev experience, and the current types don't work with PHPStorm's analysis but would work with just the inclusion of @inheritDoc
.
Is there something I'm missing about @inheritDoc
that would make its inclusion in the docblocks of DataList methods in order to support PHPStorm unfeasible? If it degrades the experience in other editors I'd concede that that's not a trade to make, but if all it does is improve PHPStorm support, I think that's worth it. I'd be willing to create the PR.
from silverstripe-framework.
Seems like a pretty trivial fix, and given the prevalence of PHPStorm I think it’s worthwhile. Some of the comments in DataList
do contain a bit more (DataObject-specific) info than the methods they’re overriding, so rather than using @inheritDoc
it might be better to copy the return types down in some places. Do you want to have a crack at a PR @MasonD?
from silverstripe-framework.
Sure. Which branch would you like me to target it on?
from silverstripe-framework.
I think 5
rather than 5.2
, because I suppose this is more an enhancement for PHPStorm users than an bug fix
from silverstripe-framework.
Linked PR has been merged, it will be automatically tagged shortly
from silverstripe-framework.
Related Issues (20)
- Filtering against NULL vs empty string causes confusion HOT 1
- Make the form action in GridFieldDeleteAction extensible HOT 7
- Strong typing removed in a merge-up
- DBClassNameTrait using wrong parent constructor arguments HOT 1
- Replace `HTMLEditorSanitiser` with `symfony/html-sanitizer`
- Rename Deprecation::withNoReplacement() HOT 1
- Member::member_from_tempid is slow
- Refactor `ViewableData` (aka `ModelData`) in CMS 6
- Controller::curr() should return null instead of throwing an exception
- ListDecorator and PaginatedList shouldn't return the inner list
- Consolidate CMS Form validation HOT 1
- Align `ArrayList` with other lists
- Consolidate validation systems HOT 7
- HTTPOutputHandler has the wrong contructor after adding deprecation notice HOT 1
- Rename SS_List to ListInterface
- disabled searchable dropdown shows "Type to search..." where the field is disabled
- ModelAdmin executes init code even when there is no authenticated user HOT 1
- Implement DBField validation
- Replace RequireFields with DataObject.require config
- CMS 6 phpunit xml failure HOT 1
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 silverstripe-framework.