Jordi Boggiano
1cc23e1a8b
🤦♂️
2022-04-02 13:04:03 +02:00
Jordi Boggiano
6b330b7456
Fix tests
2022-04-02 12:58:29 +02:00
Jordi Boggiano
34fa266114
Fix windows build
2022-04-02 12:48:02 +02:00
Jordi Boggiano
0985501602
Fix windows build
2022-04-02 12:38:23 +02:00
Jordi Boggiano
ecec0d00fc
Fix generation of autoload rules in a dir that is missing to ensure it does not break ( #10688 )
2022-04-01 21:20:21 +02:00
Jordi Boggiano
f31700bf19
Sort packages with the same weight alphabetically to have a completely stable sort not dependent on input order, fixes #10614
2022-03-15 11:35:33 +01:00
Jordi Boggiano
f808e4907c
Fix handling for non-lowercased enum keyword, fixes #10521
2022-02-15 16:41:06 +01:00
Jordi Boggiano
db8ea45295
Fix enum parsing when the syntax is "enum foo:string {}" without space between name and type, fixes #10498
2022-02-02 17:48:45 +01:00
Jordi Boggiano
e1bf45aa80
Fix issue parsing php files with unterminated comments found inside backticks, fixes #10385
2021-12-22 21:42:19 +01:00
Helmut Hummel
0b9e1da4fc
Allow recursively call composerRequire ( #10312 )
...
Fixes : #10311
Related: #10065
2021-11-25 20:50:26 +01:00
Jordi Boggiano
65765a148a
Explicitly deprecate misuse of the link setters to enforce the fact they expect maps ( #10281 )
2021-11-12 21:38:08 +01:00
Martin Herndl
7eca450d9b
Add wildcard support to ignore-platform-req, fixes #10045 ( #10083 )
2021-11-11 15:56:38 +01:00
Martin Herndl
3013674c92
Refactor ignore platform reqs checks ( #10079 )
...
Introduces a `PlatformRequirementFilter` with methods that help to decide if a requirement is ignored or not as discussed in #10045 but without changing behaviour.
2021-11-11 12:24:12 +01:00
Jordi Boggiano
6aa8a466b7
Fix tests
2021-11-10 22:10:36 +01:00
Jordi Boggiano
cb0293cf30
Finalize phpstan level 6 for tests dir, closes #10159
2021-11-02 14:32:09 +01:00
Jordi Boggiano
44b69ba77f
Upgrade php-cs-fixer to 3.x and fix CS
2021-10-27 16:21:45 +02:00
megubyte
135f806f6f
phpstan: update tests/Composer/Test/Autoload/* to level 6 standard ( #10223 )
2021-10-26 21:48:56 +02:00
Martin Herndl
bd8b39fe01
Add types to `Package` ( #10210 )
2021-10-25 13:45:09 +02:00
Jordi Boggiano
9599eb613b
Type annotations
2021-10-16 11:14:10 +02:00
Jordi Boggiano
d64d1adf61
Rewrite php file cleaning step to be less regex intensive and support extreme cases better, fixes #10106 ( #10107 )
2021-10-02 14:39:39 +02:00
Jordi Boggiano
8cd2d0e541
Fix scanning of classmaps in files containing invalid Unicode, fixes #10102
2021-09-15 11:31:43 +02:00
Jordi Boggiano
d8054d1d2f
Add more possessive quantifiers, unicode flag and support for more post-heredoc syntax, fix test file syntax being invalid
2021-08-29 12:23:02 +02:00
Jordi Boggiano
3f79e59f69
Add test assertions for heredoc marker inside the text
2021-08-23 13:14:16 +02:00
jrfnl
b66b23a03f
ClassMapGeneratorTest: add test with consecutive duplicate heredoc markers
...
... as well as a test with heredoc markers with only a newline character between the start and end marker.
2021-08-21 17:45:42 +02:00
Jordi Boggiano
d3c176ec69
PHPStan Level 5 ( #10070 )
...
* Bump PHPStan to level 5
* Update seld/phar-utils to latest
* Add phpstan-setup / phpstan scripts
2021-08-21 17:41:52 +02:00
jrfnl
e729c418dd
ClassMapGenerator: add test for "marker in text" bug
...
In PHP < 7.3, the heredoc/nowdoc marker was allowed to occur in the text, as long as it did not occur at the very start of the line.
This was also not handled correctly.
Ref: https://www.php.net/manual/en/migration73.incompatible.php#migration73.incompatible.core.heredoc-nowdoc
2021-08-11 22:23:24 +02:00
jrfnl
9588654ae3
ClassMapGenerator: add tests for "long heredoc" bug
...
... to proof the existence of the bug and demonstrate the effect.
Note: in the test the backtrack limit is being lowered (and restored back to the default afterwards) to prevent the tests needing ridiculously huge test fixture files.
2021-08-11 22:21:57 +02:00
Ayesh Karunaratne
228428747a
Add support for autoloading Enums
...
PHP 8.1 supports Enums, and [Enums follow class-semantics](https://php.watch/versions/8.1/enums#class-semantics-autoload ).
Composer's class-map generator currently looks for `class`, `interface`, and `trait` keywords. If Composer is run in PHP 8.1 or later, Composer now additionally looks for `enum` keyword as well. This is similar to how Hack's `enum` support is added.
This PR also adds tests for basic enums, backed enums, namespaced enums, and an enum that implements an interface and extends a class.
2021-02-06 15:51:18 +07:00
Jordi Boggiano
07b8c23f02
Merge branch '1.10'
2021-01-27 15:46:58 +01:00
Jordi Boggiano
92313447d6
Filter out exclude-from-classmap rules to avoid generating very long regexes, fixes #9487
2021-01-27 15:10:32 +01:00
Nicolas Grekas
ba94445bb9
Ensure InstalledVersions reports info about all currently registered class loaders
2021-01-27 10:39:35 +01:00
Jordi Boggiano
b7d770659b
CS fixes
2020-11-22 14:52:39 +01:00
Jordi Boggiano
b574f10d9d
Rename mainPackage to rootPackage in AutoloadGenerator and ensure we use RootPackageInterface
2020-11-12 10:41:06 +01:00
Jakub Bouček
8dc5effee7
AutoloadGenerator: Send error HTTP status on error
2020-11-05 09:57:48 +01:00
Jordi Boggiano
56c65a58e2
Make platform-check only check non-dev requires, refs #9412
2020-11-04 23:41:58 +01:00
Jordi Boggiano
8c1355f448
Improve output of platform check further in case errors are hidden
2020-11-04 22:28:17 +01:00
Jakub Bouček
2595de07ce
AutoloadGenerator: Trigger native PHP error on platform checks fails - tests
2020-11-04 12:28:15 +01:00
Jakub Bouček
6f1761fe18
AutoloadGenerator: Send error HTTP status on error - update tests
2020-11-04 11:18:21 +01:00
zorn
5aa90baab1
Add new lines to platform reqs issues
2020-11-01 23:39:06 +10:00
Jordi Boggiano
24abd233ec
Merge branch 'master' into code-improvements
2020-10-13 12:23:13 +02:00
Jordi Boggiano
0775e261c5
Merge remote-tracking branch 'lstrojny/apcu-prefix'
2020-10-13 10:19:30 +02:00
Michael Telgmann
a4509d28e7
Introduce constants for Composer\Package\Link types
2020-09-21 14:22:06 +02:00
Simon Berger
80a75e9959
Minor code improvements
2020-09-20 02:16:28 +02:00
Lars Strojny
0b6abf3b96
APCu prefix as a separate option
2020-09-16 10:49:00 +02:00
Lars Strojny
de0085767c
Sanitize prefix
2020-09-15 12:39:22 +02:00
Lars Strojny
dafd225a35
Allow to pass a string for apcu-autoloader to set the APCu prefix
2020-09-14 22:36:53 +02:00
Jordi Boggiano
d942c65e0c
Fix more warnings
2020-09-11 11:32:09 +02:00
Jordi Boggiano
1593b67230
Fix warnings on higher phpunit versions
2020-09-11 11:01:32 +02:00
Jordi Boggiano
67a88880ec
Get rid of EmptyConstraint
2020-06-05 16:52:24 +02:00
Yanick Witschi
bde9502473
Made the constraint argument in Link mandatory
2020-06-05 16:52:24 +02:00