Commit graph

198 commits

Author SHA1 Message Date
0e3f487681
TASK: Add removed classes in 7.0
Relates: #41
2017-04-27 16:10:28 +02:00
11db09a303
TASK: Update phpdocs
* Remove unnecessary docs.
* Add necessary docs.
2017-04-27 15:40:02 +02:00
003609342e
TASK: Refactor DRY
* Don't duplicate code and logic.
* Move common code to parent class.

Relates: #71
2017-04-27 14:37:24 +02:00
510774a3cc
TASK: Support at least PHP 5.6
* Adjust CI , composer and docs.
* Migrate modern code to 5.6 supported code.

Relates: #71
2017-04-27 14:16:22 +02:00
b9bdd5dd3b
TASK: Migrate RemovedClassFeature
* Also migrate RemovedClassFeature to new structure with
  AbstractYamlRemovedUsage

Relates: #71
2017-04-27 14:05:05 +02:00
bcbd1f96bc
TASK: Migrate GenericConstantUsageSniff
* Migrate GenericConstantUsageSniff to new architecture.
* Move non common functionality from AbstractGenericPhpUsage to concrete
  classes.

Relates: #71
2017-04-27 13:33:28 +02:00
84dd380a3c
TASK: Migrate GenericFunctionCallSniff
* Migrate GenericFunctionCallSniff to new architecture.
* Provide new abstract class for php removed functions and constants.
* Fix TypoScriptSniff not always returning array.
* Adjust warnings in Expected.json

Relates: #71
2017-04-27 13:23:51 +02:00
2659066e21
WIP|TASK: Migrate Typo3Update_Sniffs_Removed_TypoScriptSniff
* Refactor yaml based removed check architecture.
* Migrate TypoScriptSniff to new architecture.

Relates: #71
2017-04-27 12:51:16 +02:00
fad2a4e498
FEATURE: Allow empty feature yaml files
* Handle empty yaml files for features in options class.
2017-04-27 11:48:59 +02:00
f972533e04 WIP|FEATURE: Check for removed php classes.
* Add feature to existing code base and logic, see #72 .
* Add first removed classes for TYPO3 7.0 as example.
* Adjust first test to make sure basic implementation works.

Relates: #41
2017-04-27 11:23:29 +02:00
Daniel Hürtgen
01af1eaf4b Merge branch 'feature/54-add-checks-for-typoscript' into 'develop'
Feature/54 add checks for typoscript

Closes #54

See merge request !74
2017-04-27 10:45:13 +02:00
Daniel Hürtgen
7398caa099 TASK: Simplfy “features" iterator 2017-04-27 10:23:02 +02:00
Daniel Hürtgen
cecfe983e0 TASK: Simplfy feature support trait 2017-04-27 10:17:05 +02:00
370015e7c0
TASK: Refactor code
* Reduce indentation.
* Provide internal API to add new feature with necessary checks.
2017-04-25 16:36:12 +02:00
7f7a7aa38d
TASK: Add missing docs 2017-04-25 16:35:54 +02:00
69bb97ad94
Merge branch 'feature/72-refactor-sniff-architecture' into feature/54-add-checks-for-typoscript 2017-04-25 15:50:04 +02:00
2cc21fdafa
TASK: Cleanup code
* Remove unnecessary documentation.
* Remove unused code.
* Add missing documentation.

Relates: #72
2017-04-25 15:20:35 +02:00
21cf62b949
TASK: migrate InheritanceSniff
Relates: #72
2017-04-25 15:09:32 +02:00
14c82e4a10 TASK: Migrate IsACallSniff
* Add further tests with quotes.
* Handle prefix in strings.
* Remove old originalTokenContent which is no longer in use, as we use
  str_replace, introduced in earlier commit.

Relates: #72
2017-04-25 14:36:19 +02:00
efd5d9114f
TASK: Migrate MissingNamespaceSniff
* Make MissingNamespaceSniff work again.
* Move to old namespace as it's a custom sniff, not a general one.
* Do not use new feature here, implement logic internal.
* Remove message from ruleset, use it directly.

Relates: #72
2017-04-25 14:11:40 +02:00
d3b612790c
TASK: Make inline replacements work again
* As sometimes not the whole token should be replaces, but only the
  classname within the token, we replace them always this way.
* Before the refactoring, that was done in the concrete sniffs.
* Affected are e.g. php doc comments.

Relates: #72
2017-04-25 13:45:46 +02:00
c91dc8065f
TASK: Make TypeHintCatchExceptionSniff work again
* Fix wrong class name, to allow features to match.

Relates: #72
2017-04-25 13:33:56 +02:00
c4c8faacd2
WIP: Fix TypeHintSniff
* Make TypeHintSniff tests pass again.
* Fix typo in class name preventing new feature mechanism from matching.

Relates: #72
2017-04-25 13:25:48 +02:00
94df1f2ad1
WIP: Fix use sniff
* Make use sniff tests pass again.

Relates: #72
2017-04-25 13:16:58 +02:00
cc0be4a5b4
WIP: Move features to own namespace
* Have all feature related classes in a single namespace.

Relates: #72
2017-04-25 13:03:36 +02:00
2f6dc2304a
WIP: Refactor code to new architecture
* Migrate class names.
* Add new architecture of "Features".
* Configure old assignments for new features.
* Rename necessary parts.

Relates: #72
2017-04-25 12:58:19 +02:00
b502e52920
TASK: Add missing license
* Add license to file.
2017-04-25 08:20:08 +02:00
42e04617bc
BUGFIX: CGL issue
* Follow CGL and fix issue.
2017-04-13 16:14:56 +02:00
498e00c6f0
TASK: Add missing phpdoc 2017-04-13 16:05:34 +02:00
6e602cf5f5
TASK: Add all remaining TypoScripts
Resolves: #54
2017-04-13 16:02:40 +02:00
5387e553c5
TASK: Add remaining TypoScript changes for 7.1
Relates: #54
2017-04-13 15:51:01 +02:00
7c5d95d0e0
TASK: Update test
* Make sure test is running again with new additions of cObjects.
* Also fix description containing dot at the end.

Relates: #54
2017-04-13 15:30:42 +02:00
3e9d8c01c8
TASK: Rename TypoScript sniff
* As we not only check ObjectIdentifier's anymore, but also further
  parts, renamce sniff to be more generic.
* Also rename configuration and tests accordingly.

Relates: #54
2017-04-13 15:27:25 +02:00
ca4d687155
FEATURE: Also check TypoScript objects
* Not only check paths, but also objects like cObjects.
* Update test input for verification.
* Add further breaking changes for 7.1
2017-04-13 15:22:38 +02:00
12fcc704dc
TASK: Fix php syntax issue
* It's not even a warning, but still wrong
2017-04-13 15:21:59 +02:00
2e7f155b8d
TASK: Configure all 7.0 breaking changed for ObjectIdentifier
Relates: #54
2017-04-13 14:57:33 +02:00
e1b3f31c78
FEATURE: Add second TypoScript check
* Extend test to show what's possible and covered and what is not
  covered yet.

Relates: #54
2017-04-13 14:20:36 +02:00
920c923ed7
FEATURE: Add missing method to make tests pass.
* Retrieve yaml files for removed typoscript object identifier.

Relates: #54
2017-04-13 13:40:04 +02:00
7a999212e2
FEATURE: Add first TypoScript sniff
* Add configuration for removed object identifiers.
* Add sniff for removed object identifiers.

Relates: #54
2017-04-13 13:32:20 +02:00
e7dbac4d33
TASK: Cleanup php code
* Adjust variable name, as this is generic and not about constants.
2017-04-13 13:31:32 +02:00
Daniel Hürtgen
4461e116db FEATURE: Test for removed extension key sniff added 2017-04-11 13:01:37 +02:00
Daniel Hürtgen
b44eb0994f BUGFIX: URL typo fixes 2017-04-11 12:57:35 +02:00
Daniel Hürtgen
be4b76c192 BUGFIX: Adjust TYPO3 docs urls 2017-04-11 12:53:02 +02:00
89af4a2e37
TASK: Configure phpmd
* Make phpmd pass.
* Comment supressions with a reason.
2017-04-11 08:40:19 +02:00
d81b50d88e Merge remote-tracking branch 'origin/feature/update-typoscript-dependency' into feature/gitlab-ci 2017-04-10 09:35:03 +02:00
65bc89ad7c Merge remote-tracking branch 'origin/develop' into feature/46-automated-testing 2017-04-09 20:20:21 +02:00
a16ae7b8d4
TASK: Update to latest TypoScript tokenizer
* As official project does no longer modify the file to tokenize.
* Add tests to test integration.
2017-04-09 20:14:16 +02:00
f373826cc6
BUGFIX: Update string to replace missing vendor token
* Using double quotes with method call didn't work the way.
* Use normal string concatenation instead.
2017-04-09 12:51:57 +02:00
0c733c5e80 Merge remote-tracking branch 'origin/develop' into feature/46-automated-testing 2017-04-09 12:46:43 +02:00
Daniel Hürtgen
84266c381d Merge pull request #50 from DanielSiepmann/feature/42-deprecated-constants
Feature/42 deprecated constants
2017-04-08 12:35:43 +02:00
03f321c865
FEATURE: Add tests and fix issues
* Add test for IsACallSniff.
* Fix doublicate finds in IsACallSniff and
  InstantiationWithObjectManagerSniff.
* Both didn't stop looking for class at end of expression.

Relates: #46
2017-04-06 12:35:44 +02:00
d7911cccee
BUGFIX: Keep line ending for inline comments
* As test showed, line ending was removed for inline comments "//".
* This line ending is now kept.
* Test does not fail anymore.

Relates: #46, #3
2017-04-06 11:57:00 +02:00
20952b7710
TASK: Refactor options access
* No longer use trait but static methods due to lack of Dependency
  Injection.
* Adjust all calls.
* Also don't use yield any longer but return array of file names.

Relates: #42
2017-04-06 09:12:43 +02:00
b99438fff9
TASK: Refactor remove duplicate logic
* Make option trait cleaner, remove duplicate logic and use methods for
  same logic.
* Also fix issue in readme pointing to non existing config name.

Relates: #42
2017-04-06 08:26:13 +02:00
0e5d74b51d
Merge remote-tracking branch 'origin/develop' into feature/38-add-typoscript-tokenizer 2017-04-06 08:10:21 +02:00
Daniel Hürtgen
da0adb7d5e Merge pull request #52 from DanielSiepmann/feature/49-deprecated-use-statements
FEATURE: Migrate legacy class names in use statements
2017-04-04 16:39:39 +02:00
Daniel Hürtgen
22c2f4cb1c Merge pull request #51 from DanielSiepmann/hotfix/48-multiple-type-hints
BUGFIX: Allow multiple type hints in php docs
2017-04-04 16:36:47 +02:00
300e3511be
TASK: Remove example sniff
* As this is just an example and we want to have a clean state.
* Also cleanup imported interface which is not in use anymore.
2017-04-04 14:48:10 +02:00
2e115bb3f7
FEATURE: Migrate legacy class names in use statements
Resolves: #49
2017-04-04 14:39:31 +02:00
55bdb39fa5
WIP|FEATURE: Integrate TypoScript
* Provide tokens for TypoScript.
* Provide first basic example of a working sniff.

Relates: #38
2017-04-04 13:31:39 +02:00
f3e708f5e0
BUGFIX: Allow multiple type hints in php docs
* Respect possible separation by "|" and handle each of them.

Resolves: #48
2017-04-04 10:57:42 +02:00
818f266b9e
TASK: Cleanup some comments 2017-04-04 10:27:04 +02:00
99840b080f
FEATURE: Finish refactoring
* Removed functions and constants are working now.

Relates: #42
2017-04-04 10:21:16 +02:00
1a081900b2
WIP|FEATURE: Add removed constants
* Add configuration.
* Refactor common base for functions and constants.
* Add constants handling.

Relates: #42
2017-04-04 09:59:28 +02:00
b5e7e15683 Merge branch 'feature/33-deprecated-handling' into feature/42-deprecated-constants 2017-04-04 08:41:02 +02:00
034ab57a34
TASK: Skip unnecessary function call 2017-04-04 08:39:09 +02:00
830584fa87
TASK: Improve docs 2017-04-04 08:37:01 +02:00
9c6085642e
BUGFIX: Respect double quotes for ajax deprecation
Relates: #33
2017-04-04 08:36:57 +02:00
Daniel Hürtgen
aa8ffab3fa TASK: Rename removed function method 2017-03-30 17:02:36 +02:00
56d692bac7
TASK: Add missing docs
* Add docs for new feature.

Relates: #33
2017-03-30 13:18:44 +02:00
a4f4fd1ad7
WIP|TASK: Copy and paste function code
* Refactor afterwards

Relates: #42
2017-03-30 13:13:19 +02:00
125c4280d6
WIP|FEATURE: Try to add tokenizer
* First try to add tokenizer to code sniffer

Relates: #38
2017-03-30 13:02:47 +02:00
1c4fce2315
TASK: Adjust for CGL 2017-03-30 11:21:03 +02:00
93c0cff635
TASK: Rename deprecated to removed for functions
* As we check removed functions, the folder and code should reflect
  that.

Relates: #33
2017-03-30 11:08:42 +02:00
21b7c09416
FEATURE: Add removed functions for TYPO3 7.x.
* Adjust structure of deprecated functions yaml.
* Add version of removal to message for removed functions.

Relates: #33
2017-03-30 11:03:30 +02:00
4c162af3d4
TASK: Finish 7.0 breaking changes 2017-03-30 08:08:41 +02:00
81fc7f7608
WIP|FEATURE: Add further deprecated calls
* Configure further deprecated calls for TYPO3 7.0
* Remove todo as it's already done.

Relates: #33
2017-03-28 16:41:15 +02:00
b652137e96
FEATURE: Provide code to handle deprecated method calls
* Add parsing of YAML-files.
* Check matching deprecated calls.
* Provide necessary information for PHPCS and user.

Relates: #33
2017-03-28 15:29:26 +02:00
cd434ac639
WIP|FEATURE: Provide configuration files for deprecated functions
* To provide a way to adjust deprecations without touching standard.
* Provide an option defining the path to lookup the configuration files.
* Parse yaml files containing deprecations.

Relates: #33
2017-03-28 12:52:14 +02:00
0ee10ea61f
BUGFIX: Allow deprecations to work in vim too.
* Remove line breaks from output, as syntastic will not parse them.
* It's up to the report to format the messages, not the Sniff.

Relates: #33
2017-03-28 11:44:06 +02:00
65773c88b5
WIP|FEATURE: Provide first deprecation function sniff
* Use a single generic sniff with configuration.

Relates: #33
2017-03-28 10:57:35 +02:00
2118d86879
WIP|FEATURE: First working check for deprecated functions
* Provide a generic sniff with configuration (property) containing all
  deprecated calls.
* Check function calls and provide warning with information.

Relates: #33
2017-03-28 10:31:30 +02:00
293a6570a8
FEATURE: Add sniff to check for Breaking: #69916
Relates: #33
2017-03-28 09:27:42 +02:00
426dc8b318
BUGFIX: Define property where it's used
* As we use it in parent class, define it there.
2017-03-23 16:48:28 +01:00
842a54d5d9
TASK: Fix quality issues 2017-03-23 16:40:03 +01:00
6a115bd8d0
TASK: Cleanup before PR
* Adjust some comments and formating.
* Add missing, but used, properties.
* Shorten variables used only once.

Resolves: #36
2017-03-23 16:24:22 +01:00
9b3d5d9515
BUGFIX: Support multiple interfaces
* Process extends as before.
* Process all interfaces in addition, not only the first one.
2017-03-23 16:12:40 +01:00
5a8260815c
Merge remote-tracking branch 'origin/develop' into feature/36-namespace-migration
* Make mapping file path configurable

Relates: #36, #37
2017-03-23 13:34:12 +01:00
6420c72945
FEATURE: Allow remapping of usages for redefiined classes
* As we already adjust function, trait and interface definitions, we now
  also migrate the usage of the old versions.
* This is done in second run, as mentioned in adjusted Readme.

Relates: #36
2017-03-23 13:24:24 +01:00
8fbe25a422
TASK: Cleanup missing vendor
* Add configured vendor in message for easer migration in IDEs (by
  hand).
* Remove non existing function from checks.

Relates: #36
2017-03-23 13:24:11 +01:00
1561c13b46
FEATURE: Improve handling of missing Vendor
* Check for string concatenation instead of earlier more stupid.

Relates: #36
2017-03-23 13:24:04 +01:00
f9f82b0629
FEATURE: Migrate plugin and module registration and configuration
* Prefix with configured vendor if first argument does not start with a
  string already.

Relates: #36
2017-03-23 13:23:54 +01:00
eaa99973b1
TASK: Refactor existing sniffs to work again
* As we migrated trait to class, all sniffs have to extend instead to
  use the new class.
* Also make PhpCsFile import and type hints the same across all sniffs.

Relates: #36
2017-03-23 13:23:26 +01:00
f91d3240e5
TASK: According to PR, use else instead of default 2017-03-23 13:23:18 +01:00
0d985ef42a
TASK: Fix call to undefined method
Relates: #33
2017-03-23 13:23:09 +01:00
9a13223d62
TASK: Rename method
* To follow CGL

Relates: #33
2017-03-23 13:22:58 +01:00
21c72c8b96
WIP|FEATURE: Handle trait and interfaces beside classes
* Also fix check whether another line should be added after namespace
  definition.

Relates: #36
2017-03-23 13:22:16 +01:00
1b610844b9
BUGFIX: PHPDoc 2017-03-23 10:18:01 +01:00
4e0c2802e4
FEATURE: Make path to mapping file configurable
* This way one can define the path in his own ruleset.xml
2017-03-23 09:37:08 +01:00
fcb778d903
WIP|FEATURE: Provide sniff to convert old legacy class definitions
* Insert missing namespace, based on existing class name.
* Allow configuration of Vendor to use.

* Will not adjust uses of the class.
* All other sniffs are broken right now, they need to be adjusted to
  new abstract class.

Relates: #36
2017-03-23 08:52:25 +01:00