Skip to content
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

Fix running php artisan enum:annotate on long enum class #294

Merged
merged 4 commits into from
Jan 12, 2023

Conversation

mikkoaf
Copy link
Contributor

@mikkoaf mikkoaf commented Dec 13, 2022

This tests #293

  • Added or updated tests
  • Added or updated the README.md
  • Detailed changes in the CHANGELOG.md unreleased section

Related Issue/Intent

Resolves #293

Changes

Currently adds a test depicting behavior described in the issue. Using the php artisan enum:annotate command fails on a particular enumeration class.

  • Add ManyLongConstantNames testing class

Breaking changes

@spawnia spawnia marked this pull request as draft December 14, 2022 14:27
@spawnia spawnia added the bug label Dec 14, 2022
Initially the preg_replace() method resulted in a PREG_JIT_STACKLIMIT_ERROR

This change decreases the resources used on the test set as the comment
row pattern is matched at once instead by the character.

I used the https://regex101.com/ Regex Debugger to verify and visualize
my findings.
@mikkoaf mikkoaf marked this pull request as ready for review December 16, 2022 10:15
@mikkoaf
Copy link
Contributor Author

mikkoaf commented Jan 12, 2023

@spawnia I have solved the issue by updating the used regex.

@spawnia
Copy link
Collaborator

spawnia commented Jan 12, 2023

Thanks @mikkoaf, I will prepare a release.

@spawnia spawnia changed the title Add test on many constants with long names Fix running php artisan enum:annotate on long enum class Jan 12, 2023
@spawnia spawnia merged commit 95badb5 into BenSampo:master Jan 12, 2023
@mikkoaf mikkoaf deleted the annotation-command-null branch January 12, 2023 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

classDeclarationOffset unavailable when content removed with existing docblock
2 participants