Skip to content

[Fix] localheinz/diff dependency to version 1.3.0#1493

Merged
localheinz merged 1 commit intoergebnis:mainfrom
andrey-helldar:patch/2025-08-30/17-39
Aug 30, 2025
Merged

[Fix] localheinz/diff dependency to version 1.3.0#1493
localheinz merged 1 commit intoergebnis:mainfrom
andrey-helldar:patch/2025-08-30/17-39

Conversation

@andrey-helldar
Copy link
Contributor

@andrey-helldar andrey-helldar commented Aug 30, 2025

Description

Today I discovered a problem - the normalizer stopped starting.

The reason is the updated dependency localheinz/diff to version 1.4.1.

Apparently, someone pushed the old tags:

image

Release dates for tags:

  • 1.3.0 - 2025-08-30 09:44 UTC
  • 1.4.0 - 2015-12-06 07:21 UTC
  • 1.4.1 - 2015-12-08 07:14 UTC
  • 1.4.2 - 2017-05-18 13:44 UTC
  • 1.4.3 - 2017-05-22 07:24 UTC

Why 1.4.1 version? It's simple:

  • 1.4.1 requires PHP >=5.3.3
  • 1.4.2 requires PHP ^5.3.3 || ^7.0
  • 1.4.3 requires PHP ^5.3.3 || ^7.0

I use a PHP 8.3 and 8.4 versions.

Reproducing the problem:

$ composer global update
...
  - Downloading localheinz/diff (1.4.1): Extracting archive
  - Installing localheinz/diff (1.4.1): Extracting archive
$ composer normalize
PHP Fatal error:  Uncaught Error: Class "Localheinz\Diff\Differ" not found in C:\Users\Helldar\AppData\Roaming\Composer\vendor\ergebnis\composer-normalize\src\NormalizePlugin.php:64
Stack trace:
#0 phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php(710): Ergebnis\Composer\Normalize\NormalizePlugin->getCommands()
#1 phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php(279): Composer\Console\Application->getPluginCommands()
#2 phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php(171): Composer\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php(137): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer(98): Composer\Console\Application->run()
#5 C:\ProgramData\ComposerSetup\bin\composer.phar(29): require('phar://C:/Progr...')
#6 {main}
  thrown in C:\Users\Helldar\AppData\Roaming\Composer\vendor\ergebnis\composer-normalize\src\NormalizePlugin.php on line 64

Environment

  • PHP 8.3, 8.4
  • OS Windows 11

Hotfix for developers

# for global usage
composer global require localheinz/diff:1.3.0

# for local usage
composer require localheinz/diff:1.3.0 --dev

Fix is working:

$ composer normalize                          
Running ergebnis/composer-normalize by Andreas Möller and contributors.

./composer.json is already normalized.

@localheinz localheinz force-pushed the patch/2025-08-30/17-39 branch from 6a1e910 to f6749ca Compare August 30, 2025 16:25
@localheinz localheinz added the bug label Aug 30, 2025
@localheinz
Copy link
Member

Yes, I made a mistake here and accidentally pushed tags that I had no intention to push. I have deleted them on

Not sure if this makes things worse, but I probably need to find a better way.

@codecov
Copy link

codecov bot commented Aug 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.75%. Comparing base (4c15f84) to head (f6749ca).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1493   +/-   ##
=========================================
  Coverage     82.75%   82.75%           
  Complexity       60       60           
=========================================
  Files             4        4           
  Lines           377      377           
=========================================
  Hits            312      312           
  Misses           65       65           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@localheinz localheinz merged commit 73043aa into ergebnis:main Aug 30, 2025
28 checks passed
@localheinz
Copy link
Member

Thank you, @andrey-helldar!

@andrey-helldar andrey-helldar deleted the patch/2025-08-30/17-39 branch August 30, 2025 16:47
@andrey-helldar
Copy link
Contributor Author

Yes, I made a mistake here and accidentally pushed tags that I had no intention to push. I have deleted them on

Not sure if this makes things worse, but I probably need to find a better way.

Removing tags in the repository helps.

Now, to make everything work for others, you need to update the dependency (locally or globally). Then the composer will see that the version is missing and automatically roll it back.

The changes I have proposed will “nail down” version 1.3.0 in the project code.

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.

2 participants