Download the PHP package takielias/contract-resolver without Composer

On this page you can find all versions of the php package takielias/contract-resolver. 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 contract-resolver

Contract Resolver

Latest Version Stars Total Downloads Issues Forks GitHub Tests Action Status Linkedin

A powerful Laravel package that automatically resolves and binds contracts (interfaces) to their implementations, with comprehensive code generation commands for repositories and services following the Repository and Service pattern.

takielias



โœจ Features

๐Ÿš€ Installation

You can install the package via composer:

The package will automatically register itself via Laravel's package discovery.

Publishing Configuration

Optionally, you can publish the config file:

๐Ÿ“– Usage

Available Commands

Command Description
cr:make Interactive command to create repositories, services, or both
cr:make-repo-interface Generate repository interface
cr:make-repo Generate repository implementation
cr:make-service-interface Generate service interface
cr:make-service Generate service implementation

Auto-binding Contracts

The package automatically scans and binds interfaces to their implementations based on Laravel conventions:

Directory Structure:

Example Interface:

Example Implementation:

Using in Controllers:

Code Generation Commands

The package provides powerful artisan commands to generate boilerplate code:

Generate Everything

This interactive command will prompt you to:

  1. Choose what to create (Service, Repository, or All)
  2. Enter the name (e.g., "Product")

Generate Repository with Interface

Generated Interface (app/Contracts/Repositories/ProductRepositoryInterface.php):

Generated Repository (app/Repositories/ProductRepository.php):

Generate Service with Interface

Generated Service Interface (app/Contracts/Services/ProductServiceInterface.php):

Generated Service (app/Services/ProductService.php):

Advanced Usage

Nested Namespaces

The package supports nested namespaces:

This creates:

Force Overwrite

Use the --force flag to overwrite existing files:

Real-world Example

Here's a complete example of a User management system:

1. Generate the files:

2. Implement the Repository Interface:

3. Implement the Repository:

4. Implement the Service Interface:

5. Implement the Service:

6. Use in Controller:

โš™๏ธ Configuration

The package works out of the box with sensible defaults. You can customize the behavior by publishing and editing the configuration file:

๐Ÿงช Testing

Run tests with coverage:

๐Ÿ“ˆ Changelog

Please see CHANGELOG for more information on what has changed recently.

๐Ÿค Contributing

Please see CONTRIBUTING for details.

๐Ÿ”’ Security Vulnerabilities

If you discover a security vulnerability within this package, please send an e-mail to Taki Elias via [email protected]. All security vulnerabilities will be promptly addressed.

๐Ÿ† Credits

๐Ÿ“„ License

The MIT License (MIT). Please see License File for more information.

๐ŸŒŸ Show Your Support

If this package helped you, please consider giving it a โญ on GitHub!

๐Ÿ”— Links


Made with โค๏ธ by Taki Elias


All versions of contract-resolver with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^11.0|^12.0
illuminate/filesystem Version ^11.0|^12.0
illuminate/console Version ^11.0|^12.0
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 takielias/contract-resolver contains the following files

Loading the files please wait ....