ImpressPages 5
is around the corner!

A solid chunk of our community is willing to use Composer to include their beloved libraries. We are also in interest to use Composer to include 3rd party libraries instead of copy-pasting them into the core.

This version introduces a close integration with Composer. You can not only install ImpressPages via Composer but add ImpressPages plugins as well. 

This step has been planned for a long time and we have tried several different ways until we have found the best one. If you have concerns, please state them in the comments below.

We will keep releasing the ZIP version of ImpressPages. If you don't use Composer, you will be able to keep using ImpressPages and plugins as usual!

Benefits of using Composer

  • all PHP files are placed outside of the public directory
  • there are no conflicts if two plugins include the same PHP library

What's waiting next

We will keep improving the heart of ImpressPages trying to keep compatibility with existing websites close to 100%. Major updates won't be that significant as they were before and at the same time, they will be less painful. 

We don't promise the exact feature-set as we don't know it for sure. We are willing to see improvements in routing and mailing system. Also, many parts of the code need a fresh look and better structure. As much as possible will be done without breaking compatibility.

Try it out!

The current version is just for testing and giving us the response!

Install via Composer

  • Add the following code to the composer.json file
    {
        "require": {
            "impresspages/impresspages": "5.0.*",
            "impresspages/plugin-google-analytics": "*"
        },
        "scripts": {
            "post-install-cmd": ["php vendor/impresspages/impresspages/bin/setup.php public"],
            "post-update-cmd": ["php vendor/impresspages/impresspages/bin/setup.php public"]
        },
        "autoload": {
            "psr-4": {"Plugin\\": "public/Plugin/"}
        }
    }
  • Enter composer install in the command line
  • point your browser to the public" directory
  • follow the setup wizard

Install by downloading the  ZIP archive

  • download ZIP archive and extract to your server or computer
  • point your browser to the extracted directory
  • follow the setup wizard

Plugins

If you install ImpressPages 5 via ZIP achive, nothing changes regarding plugins. If you use Composer, you have two options.

The first one is to install the plugin via the composer itself:

...
    "require": {
        "impresspages/impresspages": "5.0.0",
        "impresspages/plugin-google-analytics": "*"
    },
...

Another option is to place your plugins in public/Plugin/PluginName.

There is no "best" way. We would suggest to install third party plugins via Composer and put your own project specific plugins directly in the public dir.

When installing plugins via composer, an additional composerPlugins.php file will be automatically created. It instructs ImpressPages, that those plugins are located outside the public dir.

During composer install/update, the whole assets directory of the plugin is automatically copied from vendor dir to the public dir.

If you want your plugin to be installable via Composer, add composer.json file and register the repository on packagist.org website.

Changes

If you don't use "fileOverrides" setting and don't use undocumented functions of the core, then the update must be as easy as pressing an update button in admin.

"fileOverrides" setting has been removed

This setting was mainly introduced to allow developers to hide PHP directories outside of the 'public' dir. But now, PHP files are already outside of the 'public' dir. In addition to that, fileOverrides setting influenced the performance and made it hard to improve and maintain the code.

Environment  specific configuration

config.php file was a tricky bit to deal with. It had to contain different content in dev and production environments. To solve this, ImpressPages 5 tries to find and include an additional environment specific configuration file if it finds one.

By default environment is dev. So if you add config-dev.php file next to config.php, both files will be merged producing the final configuration set. If you set the same setting in both files, the environment specific one overrides the generic one.

Usually, you would have two or more configuration files: config.php, config-dev.php, config-prod.php, ...

To change the environment, set the environment variable IP_ENV. You can do this in Apache configuration or via the command line. 

config.php is still required and always included.

Exposed file path bug

Fixed email attachment name. Removed full path and left only the file name when using ipSendEmail function.

Thank You, all of you for using and contributing to ImpressPages!

 



comments powered by Disqus