-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Roadmap #408
Comments
While most things in this roadmap are still planned for the foreseeable future, the order of when things will become available and in what release is likely to change with an eye on PHPCS 4.0 coming out sooner rather than later and the possibility that PHPCSUtils will at some point in the future become a runtime dependency for PHPCS itself. Features which will make the transition to PHPCSUtils for external standards easier will get higher priority than other new features. |
Hi @jrfnl, We (Moodle) have been doing some work with docblocks which may help towards the docblock goal. At the moment it handles file docblocks, and ooScopes docblocks.
Let me know if this might be of use and I can see how we can help further. |
@andrewnicols I've got a couple of (unfinished) branches locally and would love to chat about this at some point. Got some different priorities first now, but I'd be happy to discuss this in a call once things quieten down a little. Would you be up for that ? |
@andrewnicols Let me try and get PHPCS 4.0 out of the door first over the next few months. Once that's out, this is one of the next things on my list. (and plenty more, but I'll tell you about that if you're interested in that call ;-) ) |
Another question for you @jrfnl, I see you have on the roadmap to " Add utililty class for resolving inline names to fully qualified names." . I assume that means to take a class name, with or without a leading Did you have any thoughts on how you would like that to look and work? Equally I don't see anything here relating to Attributes - do you have any plans, thoughts, etc. on an Attribute Util? |
@andrewnicols I have a feeling it might be easier to give you some more insight into what I'm currently working on via a videocall. You previously indicated that you'd be interested in that, so let's get one set up. Is there a time today/tomorrow which would work for you ? |
FYI: I've just updated the roadmap a little. I intend to release v 1.0.12 soon after PHPCS 3.10.0 has been released. That version will add support for PHP 8.2 DNF types in all the relevant places. While what I originally intended to include in the PHPCS 1.1.0 milestone isn't completely finished yet, I don't want to hold back what is ready any longer, so I intend to merge what's ready soon after the 1.0.12 release and to release version 1.1.0 a week or two later. I have made steady progress on the other features (name resolution for inline names, Trackers, abstracts), but am not fully satisfied with their design yet. I intend to get back to these over the summer and hope to be able to release PHPCSUtils 1.2.0 with these features towards the end of the summer. Once those features are available, the PHPCS 4.0 release should follow soon after. |
These are preliminary roadmap notes for future PHPCSUtils versions
PHPCSUtils 1.1.0
Add utililty method to retrieve an array with stack pointers + names of all functions declared in a file in the current namespace (outside OO).(see Trackers)Constants
for working with (OO) constant declarations. - PR ✨ New PHPCSUtils\Utils\Constants class + associated token collection #562Initial list of methods:
getMemberProperties(File $phpcsFile, int $stackPtr): array
to retrieve the modifier information for an OO constant declaration, i.e. returns an array withis_final
,final_token
,visibility
,visibility_token
keys (can befalse
if visibility is not explicitly specified).TypeString
for working with type declaration strings. - ✨ New TypeString utility class #588Preliminary list of methods:
isSingularType(string $typeString): bool
isComplexType(string $typeString): bool
isUnionType(string $typeString): bool
isIntersectionType(string $typeString): bool
isDNFType(string $typeString): bool
(PHP 8.2+ disjunctive normal form)getTypes(string $typeString): array
to split a type string into its individual parts(Note to self: mind whitespace (and comments) within types! - Confirmed that
BCFile
,FunctionDeclarations
andVariables
methods return a type string without comments and whitespace)getOOTypes(string $typeString): array
to get only the OO names from a type stringPHPCSUtils 1.2.0
isUseOfGlobalConstant()
method to determine whether an arbitrary name token (in PHPCS 3.x alwaysT_STRING
) is the use of a "global" constant, with the caveats that unless the constant is declared in the current file or imported via ause const
statement, the method will not be able to distinguish between a global and a namespaced token when the constant is declared in the current namespace.extends
,new
,instanceof
,catch
, use statements, type declarations etc).extends
(for interface declarations),implements
,instanceof
, use statements, type declarations etc).use function
statements, maybe callbacks).use const
statements).PHPCSUtils 1.3.0
Future scope (version to be determined)
AbstractScopeSniff
, i.e. more akin toAbstractDirectScope
to allow for sniffs to run certain code for tokens in the global scope and other code for tokens in an OO/function scope.PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest
.Config
for each test class to prevent configuration directives set for one sniff influencing the tests for another.NamingConventions
: a set of methods to verify a "label name" (class, function etc) complies with certain naming conventions and methods to convert a label to a certain conventionTypeString::isValid(string $typeString): bool
to verify that a type string is valid ?This could potentially check for things like:
- Duplicate names/types in the type string
- Nullability operator
?
being used with complex types (should use|null
)- Invalid types like
resource
being used ?The text was updated successfully, but these errors were encountered: