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

Feature - #62 upgrade coding standard and lock dependencies #63

Merged

Conversation

Ocramius
Copy link
Member

@Ocramius Ocramius commented Dec 9, 2020

Resolves #62

Q A
Documentation yes/no
Bugfix yes/no
BC Break yes/no
New Feature yes/no
RFC yes/no
QA yes/no

Description

This patch:

  • locks dependencies so that things are stable during builds (mostly for phpcs/psalm, which are too volatile to leave unlocked)
  • applies automatic CS rules and improves types where applicable (although not extensively: that requires a lot of additional work that should NOT be done here)

Few false-positive BC breaks were reported, but they are just a result of bringing reality and documentation a bit closer together:

[BC] CHANGED: Type documentation for property Laminas\Code\Generator\FileGenerator#$classes changed from array to \Laminas\Code\Generator\ClassGenerator[]
[BC] CHANGED: Type documentation for property Laminas\Code\Reflection\DocBlock\Tag\ThrowsTag#$types changed from array to string[]
[BC] CHANGED: Type documentation for property Laminas\Code\Reflection\DocBlock\Tag\MethodTag#$types changed from array to string[]
[BC] CHANGED: Type documentation for property Laminas\Code\Reflection\DocBlock\Tag\PropertyTag#$types changed from array to string[]
[BC] CHANGED: Type documentation for property Laminas\Code\Reflection\DocBlock\Tag\ParamTag#$types changed from array to string[]

…via `composer.lock`

By commiting `composer.lock`, we can ensure reproducible builds for tools that change
often and otherwise break everything at the slightles improvement or regression (PHPCS, Psalm).

Our tests still verify upgrades via runtime tests, so we're still OK with running `composer update`,
just not when static analysis and code style checks run, because those are way too fragile.

Signed-Off-By: Marco Pivetta <ocramius@gmail.com>
@Ocramius Ocramius added this to the 4.0.0 milestone Dec 9, 2020
@Ocramius Ocramius self-assigned this Dec 9, 2020
…types where possible

Signed-Off-By: Marco Pivetta <ocramius@gmail.com>
@Ocramius Ocramius force-pushed the feature/#62-upgrade-coding-standard-and-lock-dependencies branch from 20d6ea9 to 75326b2 Compare December 9, 2020 21:46
phpcs.xml Show resolved Hide resolved
phpcs.xml Show resolved Hide resolved
@Ocramius
Copy link
Member Author

Tested "on the field", hence 🚢 here.

@Ocramius Ocramius merged commit 3ebacd7 into 4.0.x Dec 30, 2020
@Ocramius Ocramius deleted the feature/#62-upgrade-coding-standard-and-lock-dependencies branch December 30, 2020 16:09
@Ocramius Ocramius changed the title Feature/#62 upgrade coding standard and lock dependencies Feature - #62 upgrade coding standard and lock dependencies Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to latest coding standard and lock dependencies in builds
1 participant