Download the PHP package antstudiocz/compiler-extension without Composer

On this page you can find all versions of the php package antstudiocz/compiler-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package compiler-extension

Enhanced CompilerExtension for Nette Framework

Build Status

If you have more complicated project structure with a lot of bundles (DIC extensions), it's very common that you have to setup a lot of things and it may be quite difficult. But not with this extension. All you need is to use Adeira\ConfigurableExtensionsExtension instead of default ExtensionsExtension like this (probably in bootstrap.php):

This new extension will take care of configuration files in your bundles. Next if you want to use custom config for extension, just use provideConfig method:

You don't have to extend Adeira\CompilerExtension but there is useful helper setMapping() (it just setups custom presenter mapping). But provideConfig metod will work with Nette\DI\CompilerExtension descendants as well. And why is this so interesting? Imagine you have this config in your application (added in bootstrap via Nette\DI\Compiler::addConfig):

And now you'll add another config in your DIC extension using provideConfig method:

What is the result? Now there are three global parameters:

As you can see your custom DIC extension has priority. Extensions parameters (ext2) behaves exactly the same. What about services? As you can expect there will be three services:

And here comes the most interesting part. If you have a lot of extensions it's good idea to use custom config files (it's simple and easy to understand). But it may be hard to get extension configuration from neon file. In Nette\DI\CompilerExtension descendant class you could do simply $this->getConfig() to get configuration related to the extension, but there is no equivalent for doing this in neon. This extension adds special syntax for this case. From the previous examples there are three options related to the ext2 extension:

To get second parameter into service use this:

Remember that this is possible only if you are using custom config added by provideConfig method. It will not work in configs added in bootstrap file (via Nette\DI\Compiler::addConfig). This is because only under extension it's possible to get key from the right extension section (ext2.ext_key2 in this case).

Experimental features

These features are not enabled by default now (but may be enabled by default in the future). To enable experimental features now you have to register this extension differently:

At this moment there is so called GroupedNeonAdapter. It allows you to write service definitions in NEON with grouped syntax. Before:

After:

This feature is optional and works only in NEON files provided via provideConfig method. All classes must be registered anonymously. If it's not possible just don't use this feature.


All versions of compiler-extension with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
nette/application Version ^3
nette/di Version ^3.0.14
nette/bootstrap Version ^3.1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package antstudiocz/compiler-extension contains the following files

Loading the files please wait ....