Search code examples
composer-phptypo3typo3-extensionstypo3-9.x

TYPO3 does not notice changes from local extension installed via composer


I've created a local extension and then installed it via composer.

composer require vendorname/extension_key:@dev

Everything works as expected.

The Problem is, when I change the code of some file for example some css or a HTML teamplte file, TYPO3 does not notice the changes.

I've tried the following:

  • Clearing the Caches
  • composer update command
  • composer require command
  • composer dumpautoload

If I update or require the extension again, then to composer tells me "Nothing to install or update".

The only thing that does work if I remove the extension via composer remove and

composer remove vendorname/extension_key

then then add it again with composer require.

composer require vendorname/extension_key:@dev

Is there a better way to do this, because this is slow and inefficient.


Solution

  • I used the "version" property of the composer.json of the extension.

    At first I made a change. Then I changed the version number to the next higher number.

    Example: "version": "1.0.1" to "version": "1.0.2"

    Then I ran the composer command:

    composer update vendorname/extension_key
    

    The composer realized that there is a new version and installs it. TYPO3 then notices all the changes and everything works.

    Not sure if this is the best way, but it works the best for me so far.

    I hope this is helpful for someone else.