Download the PHP package morphql/morphql-symfony without Composer

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

MorphQL Symfony

Symfony integration for MorphQL — transform data with declarative queries.

YAML configuration · Autowiring · Twig-style file convention · PHP 8.1+

Installation

With Symfony Flex (Currently waiting for submission to symfony/recipes-contrib), this will automatically:

Without Flex, you could have to register the bundle manually in config/bundles.php (depends on your Symfony version):

The bundle is fully zero-config. All settings have sensible defaults — no YAML file is needed to get started. Just install, drop a .morphql file in morphql-queries/, and you're ready to go.

Configuration (optional)

To customize behavior, create or edit config/packages/morphql.yaml:

All options have sensible defaults — zero-config works out of the box.

Full Configuration Reference

Option Default Description
provider cli cli (bundled Node.js) or server (remote REST API)
cli_path (auto) Override CLI binary path
node_path node Path to Node.js binary
cache_dir %kernel.cache_dir%/morphql Compiled query cache
query_dir %kernel.project_dir%/morphql-queries .morphql file directory
server_url http://localhost:3000 MorphQL server URL
api_key API key for server auth
timeout 30 Execution timeout (seconds)

Usage

1. The morphql-queries/ directory

Like Twig templates in templates/, you can store your MorphQL queries in morphql-queries/. Use the .morphql extension for syntax highlighting in supported IDEs.

2. Using the Transformation Registry

Inject the TransformationRegistry to run queries stored in files:

3. Direct MorphQL usage

For ad-hoc queries, you can inject the base MorphQL service:

Features

Symfony Flex Recipe

The recipe files are staged in the symfony/recipes-contrib for Flex to pick them up automatically.

To submit the recipe:

  1. Fork symfony/recipes-contrib
  2. Create morphql/morphql-symfony/0.1/ in the fork
  3. Copy the contents of recipe/ into that directory
  4. Open a Pull Request following the recipe contribution guide

Until the recipe is accepted, users can manually:

Troubleshooting

"node" not found

If you use a version manager like NVM, asdf, or Volta, the node binary might not be in the default PATH used by your web server or PHP process.

Solution 1: Set the path in .env

Solution 2: Create a system symlink

Prerequisites

License

MIT


All versions of morphql-symfony with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
morphql/morphql Version *
symfony/framework-bundle Version ^5.4 || ^6.0 || ^7.0 || ^8.0
symfony/config Version ^5.4 || ^6.0 || ^7.0 || ^8.0
symfony/dependency-injection Version ^5.4 || ^6.0 || ^7.0 || ^8.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 morphql/morphql-symfony contains the following files

Loading the files please wait ...