contao / manager-bundle

[READ-ONLY] Contao Manager Bundle
GNU Lesser General Public License v3.0
17 stars 10 forks source link

ScriptHandler::initializeApplication() collides with installation bundle #12

Closed leofeyer closed 7 years ago

leofeyer commented 7 years ago

The ScriptHandler::initializeApplication() method does a lot of things which are done by the install tool already. Because of this, I have to use the --no-scripts flag in the build.xml file and re-build parts of the functionality:

  <target name="prepare">
    <mkdir dir="contao-managed-${version}/app" />
    <exec executable="vendor/bin/contao-console" dir="contao-managed-${version}">
      <arg value="contao:install-web-dir" />
    </exec>
  </target>

I wonder what you want to accomplish with the method? If you

  1. want to initialize the application without having to open the install tool after the installation process, the implementation is just fine. But if

  2. the user is required to open the install tool after the installation process anyway, you might as well drop the lines so we can remove the --no-scripts flag from the build file again.

aschempp commented 7 years ago

Well the user certainly has to open the install tool to enter credentials for the database. However, be aware that this command is also run on composer update, so it will make sure the application is in a clean state. Why does it harm your distribution?

leofeyer commented 7 years ago

Packing and unpacking the .zip archive resolves the symlinks, therefore when opening the install tool, you get a "folder … exists and is not a symlink" exception.

But you are right about also running the commands upon composer update, so the current implementation is correct (and so is using the --no-scripts flag in the build file).