2017 © Pedro Peláez
 

composer-installer composer-installer

image

contao-community-alliance/composer-installer

  • Friday, November 29, 2013
  • by cca
  • Repository
  • 0 Watchers
  • 0 Stars
  • 3,245 Installations
  • 183 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 18 Versions
  • 0 % Grown

The README.md

ComposerInstaller

contao composer installer, (*1)

Contao require a strict module structure. Composer install all dependencies into the vendor directory, using the complete repository structure. Both often not match each other., (*2)

To solve this problem, without making a lot of shadow copies the contao-module installer create symlinks., (*3)

Hint for users: Symlinks require a good server setup. To work with Apache2 the FollowSymLinks option is mostly required., (*4)

Hint for developers: PHP will follow symlinks by default, but using __DIR__ or __FILE__ will return the real path. You will get composer/vendor/me/my-module/MyClass.php instead of system/modules/my-module/MyClass.php., (*5)

Hint for Windows users: Symlinks on Windows require PHP 5.3+, but this is no real problem, because composer require PHP 5.3+ ;-), (*6)

Installing repository root as module my-module: Hint: This is the implicit fallback (system/modules/$packageName), if no symlinks specified!, (*7)

{
    "extra": {
        "symlinks": {
            "": "system/modules/my-module"
        }
    }
}

Installing repository sub-path src/system/modules/my-module as module my-module:, (*8)

{
    "extra": {
        "symlinks": {
            "src/system/modules/my-module": "system/modules/my-module"
        }
    }
}

Userfiles

Sometimes you need to provide user files (files within the (tl_)files directory). There is a support to install these user files. Normally these files can be modified by users. To protect user changes, user files are only copied if they are not exists. The installer will never overwrite a user file., (*9)

Hint: User files are installed into the $uploadPath directory, not TL_ROOT., (*10)

{
    "extra": {
        "userfiles": {
            "src/system/modules/my-module/files/images": "my-module/images"
        }
    }
}

Runonces

Putting your runonce.php into your modules config directory is not a good idea in combination with composer. After contao runs the runonce.php it get deleted. Next time you do an update, composer complains about this modification. To solve this, you can define your runcone.php's, yes you are right, you can use multiple runonce.php files. There is no need to name them runonce.php, feel free to use any other name., (*11)

{
    "extra": {
        "runonce": [
            "src/system/modules/my-module/runonce/init_update.php",
            "src/system/modules/my-module/runonce/do_db_update.php",
            "src/system/modules/my-module/runonce/refresh_entities.php"
        ]
    }
}

Hint: The order of the runonce files is taken into account., (*12)

Hint: No, the installer will not support directories. This is just to protect unexpected behavior., (*13)

The Versions

29/11 2013

dev-master

9999999-dev

  Sources   Download

LGPLv3

The Requires

 

The Development Requires

26/11 2013

1.7.1

1.7.1.0

  Sources   Download

LGPLv3

The Requires

 

26/11 2013

1.7

1.7.0.0

  Sources   Download

LGPLv3

The Requires

 

20/11 2013

1.6.8

1.6.8.0

  Sources   Download

LGPLv3

The Requires

 

14/11 2013

1.6.7

1.6.7.0

  Sources   Download

LGPLv3

The Requires

 

12/11 2013

1.6.6

1.6.6.0

  Sources   Download

LGPLv3

The Requires

 

08/11 2013

1.6.5

1.6.5.0

  Sources   Download

LGPLv3

The Development Requires

05/11 2013

1.6.4

1.6.4.0

  Sources   Download

LGPLv3

The Development Requires

28/10 2013

1.6.3

1.6.3.0

  Sources   Download

LGPLv3

The Development Requires

13/09 2013

1.6.2

1.6.2.0

  Sources   Download

LGPLv3

The Development Requires

11/09 2013

1.6.1

1.6.1.0

  Sources   Download

LGPLv3

The Development Requires

11/09 2013

1.6

1.6.0.0

  Sources   Download

LGPLv3

The Development Requires

24/07 2013

1.5

1.5.0.0

  Sources   Download

LGPLv3

The Development Requires

30/06 2013

1.4

1.4.0.0

  Sources   Download

LGPLv3

The Development Requires

27/06 2013

1.3

1.3.0.0

  Sources   Download

LGPLv3

The Development Requires

07/06 2013

1.2

1.2.0.0

  Sources   Download

LGPLv3

The Development Requires

08/05 2013

1.1

1.1.0.0

  Sources   Download

LGPLv3

The Development Requires

29/04 2013

1.0

1.0.0.0

  Sources   Download

LGPLv3

The Development Requires