Download the PHP package apie/service-provider-generator without Composer

On this page you can find all versions of the php package apie/service-provider-generator. 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 service-provider-generator

ServiceProvider generator

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require Code coverage

PHP Composer

This package is part of the Apie library.

Documentation

One issue with writing framework agnostic code is that most frameworks have different ways to register classes in their service container.

If we want our code to be framework agnostic we need a way to make sure we do not need maintain 2 'service container registries'.

That's where this library comes in. We use the Symfony yaml configuration files as basis and let it generate a ServiceProvider class that Laravel can use. That way we can make our library work effortlessly

Code usage

The class only creates a string with the source code, you have to manually store it in a file (recommended) or use the 'evil' eval() method.

Supported Symfony dependency injection features:

Here is a list of everything supported. Not much is supported, because a transition is not trivial or Laravel does not support it without hacks. For example private services do not exist in Laravel. Also some of these features are considered bad practices if you use them outside your application in your package, so are highly likely not to be implemented.

Feature Support
_defaults No
autowire No
autoconfigure No
reading PHP 8 attributes No
deprecated Yes
resource + exclude No
arguments by index Yes
arguments by name >= PHP8 code
service references Yes, not within array constants
constant strings starting with '@' Yes
reading parameters Mapped as Laravel config()
reading environment variables Mapped as laravel env()
environment variable parsers No
!closure No
public/private services NA
tags Only simple tags
from_callable No
aliasing Yes
anonymous services No
method calls Yes
!returns_clone No
expression language No
other imports No
Factory Service Yes
Static Factory Yes
Invokable Factory Yes
Property injection No
Lazy services No
Optional arguments Mapped as app()->bound()
parent definitions No
!service_closure No
decorators No
optional decorator No
service subscriber No
!service_locator No
@service_container No
!tagged_locator Basic support
!tagged_service Basic support
synthetic Yes
shared Yes

All versions of service-provider-generator with dependencies

PHP Build Version
Package Version
Requires symfony/yaml Version 6.*|7.*
illuminate/support Version 7.*|8.*|9.*|10.*|11.*
symfony/dependency-injection Version 6.*|7.*
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 apie/service-provider-generator contains the following files

Loading the files please wait ....