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

Bump stevegrunwell/time-constants from 1.2.0 to 2.0.2 #10

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 1, 2024

Bumps stevegrunwell/time-constants from 1.2.0 to 2.0.2.

Release notes

Sourced from stevegrunwell/time-constants's releases.

Version 2.0.2

  • Use the const keyword instead of define() for slight performance gains, easier readability, and better IDE interoperability. Props @​ChadSikorra and @​ramsey for the recommendation! (#23)

Version 2.0.1

  • Now that constants are namespaced, remove the defined() checks and unnecessary multiplication in order to a) help IDEs and b) remove an (albeit tiny) level of overhead (#21)

Version 2.0.0

⚠️ Please note: this is a major release, as it contains a breaking change to how the constants are defined. An extra file has been included to help bridge the gap between versions if you wish to run version 2.x of this library without updating all references across your app(s).

  • Introduce a Makefile for running dev commands (#17)
  • Move the constants from the global namespace into the TimeConstants namespace (#18)
  • Switch from PHP-CS-Fixer to PHP_CodeSniffer with the PHPCompatibility ruleset (#19)
    • With this change, we can run one version of PHPUnit in CI, using PHP_CodeSniffer to detect any backwards compatibility breaks with this (admittedly simply) library
    • With only one version of PHPUnit necessary, tests have been upgraded for PHPUnit 11.x

Breaking changes

This release moves the constants defined by this package from the global namespace into the TimeConstants namespace.

Your implementations of these constants can be updated in either of the following ways:

  1. Explicitly import the constant(s) being used:
    use const TimeConstants\HOUR_IN_SECONDS;
  2. Update references to use the constants new, fully-qualified names:
    - cache($key, $value, HOUR_IN_SECONDS);
    + cache($key, $value, \TimeConstants\HOUR_IN_SECONDS);

Temporary aliases to help with migration

Alternatively, you may include the new GlobalAliases.php file as a short-term fix. This file will take the newly-namespaced constants and also define them in the global namespace.

Either of the following approaches will ensure the aliased versions are loaded:

  1. (Preferred) Add the file to your composer.json file in the autoload.files array:
    "autoload": {
        "files": [
            "vendor/stevegrunwell/time-constants/src/GlobalAliases.php"
        ]
    }
  2. Explicitly requiring the file:
      require_once __DIR__ . '/vendor/autoload.php';
    + require_once __DIR__ . '/vendor/stevegrunwell/time-constants/src/GlobalAliases.php';

... (truncated)

Changelog

Sourced from stevegrunwell/time-constants's changelog.

[Version 2.0.2] — 2024-08-23

  • Use the const keyword instead of define() for slight performance gains, easier readability, and better IDE interoperability. Props @​ChadSikorra and @​ramsey for the recommendation! (#23)

[Version 2.0.1] — 2024-08-22

  • Now that constants are namespaced, remove the defined() checks and unnecessary multiplication in order to a) help IDEs and b) remove an (albeit tiny) level of overhead (#21)

[Version 2.0.0] — 2024-08-20

⚠️ Please note: this is a major release, as it contains a breaking change to how the constants are defined. An extra file has been included to help bridge the gap between versions if you wish to run version 2.x of this library without updating all references across your app(s).

  • Introduce a Makefile for running dev commands (#17)
  • Move the constants from the global namespace into the TimeConstants namespace (#18)
  • Switch from PHP-CS-Fixer to PHP_CodeSniffer with the PHPCompatibility ruleset (#19)
    • With this change, we can run one version of PHPUnit in CI, using PHP_CodeSniffer to detect any backwards compatibility breaks with this (admittedly simply) library
    • With only one version of PHPUnit necessary, tests have been upgraded for PHPUnit 11.x

Breaking changes

This release moves the constants defined by this package from the global namespace into the TimeConstants namespace.

Your implementations of these constants can be updated in either of the following ways:

  1. Explicitly import the constant(s) being used:
    use const TimeConstants\HOUR_IN_SECONDS;
  2. Update references to use the constants new, fully-qualified names:
    - cache($key, $value, HOUR_IN_SECONDS);
    + cache($key, $value, \TimeConstants\HOUR_IN_SECONDS);

Temporary aliases to help with migration

Alternatively, you may include the new GlobalAliases.php file as a short-term fix. This file will take the newly-namespaced constants and also define them in the global namespace.

Either of the following approaches will ensure the aliased versions are loaded:

  1. (Preferred) Add the file to your composer.json file in the autoload.files array:
    "autoload": {
        "files": [
            "vendor/stevegrunwell/time-constants/src/GlobalAliases.php"
        ]
    }
  2. Explicitly requiring the file:

... (truncated)

Commits
  • a06344a Merge pull request #24 from stevegrunwell/release/v2.0.2
  • 20dd772 Changelog entry for v2.0.2
  • 7eb6bef Merge pull request #23 from stevegrunwell/update/const-instead-of-define
  • f0feeea Update @​package annotations to be consistent with the package namespace
  • 3432f6f Switch from define() to the const keyword
  • de474c5 Merge pull request #22 from stevegrunwell/release/v2.0.1
  • 948a969 Changelog entry for v2.0.1
  • 2e000ae Merge pull request #21 from stevegrunwell/feature/skip-defined-and-math
  • c648d34 Skip defined() checks, unnecessary multiplication
  • e6e7761 Merge pull request #20 from stevegrunwell/release/v2.0.0
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [stevegrunwell/time-constants](https://github.com/stevegrunwell/time-constants) from 1.2.0 to 2.0.2.
- [Release notes](https://github.com/stevegrunwell/time-constants/releases)
- [Changelog](https://github.com/stevegrunwell/time-constants/blob/develop/CHANGELOG.md)
- [Commits](stevegrunwell/time-constants@v1.2.0...v2.0.2)

---
updated-dependencies:
- dependency-name: stevegrunwell/time-constants
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file php Pull requests that update Php code labels Sep 1, 2024
@andreiio
Copy link
Member

@dependabot rebase

Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 16, 2024

Looks like stevegrunwell/time-constants is no longer a dependency, so this is no longer needed.

@dependabot dependabot bot closed this Oct 16, 2024
@dependabot dependabot bot deleted the dependabot/composer/stevegrunwell/time-constants-2.0.2 branch October 16, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant