Download the PHP package spryker/api-platform without Composer

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

ApiPlatform Module

Latest Stable Version Minimum PHP Version

Installation

Canonical nested objects (*.object.yml)

A project can define the canonical inner shape of a nested object once and have it flow into every resource that tags the matching objectName. With no object files present the generator output is byte-for-byte identical to the default behavior — it is a pure project opt-in.

File location

Canonical object files live in a dedicated, reserved subdirectory literally named objects/ — distinct from resource definition files. The directory name is always objects, never named after a resource or module.

To contrast the two kinds of files clearly:

Only *.object.yml and *.object.validation.yml files belong in objects/. Resource files (*.resource.yml) are placed directly in the per-apiType directory, never inside objects/.

Naming The <dashed-name>.<kind>.yml pattern is shared by both file types — only the kind word differs. address.object.yml is the canonical-object analog of checkout.resource.yml; address.object.validation.yml is the analog of checkout.validation.yml. The object vs resource distinction marks the artifact kind, not a different naming scheme.

Full path patterns:

Example paths:

Central directory

A project may also keep canonical object files in one central, configured location instead of (or in addition to) the per-module objects/ directories. Both locations are scanned and supported simultaneously.

Enable it via the Symfony bundle config node spryker_api_platform.canonical_object_search_directories, keyed by API type. Relative paths are resolved against the project root; %kernel.project_dir% is also supported:

The same *.object.yml / *.object.validation.yml filename rules apply. The core default is an empty list, so without this configuration behavior is identical to scanning module locations only. Files in a central directory are always treated as the project layer (their path carries no /Pyz/ segment for path-based detection), so they participate in the standard project > feature > core precedence.

Defining the same objectName more than once within the same layer (for example one module file and one central-directory file, both project) is a fail-loud error: generation aborts with an ApiSchemaGenerationException naming both source files. The same name across different layers is fine — that is the normal override.

File format

Key Type Required Notes
object.name string yes CamelCase; must match the objectName: join tag in resource YAMLs
object.properties map yes Field definitions — same syntax as resource properties
object.extends string no CamelCase name of another canonical object; its resolved fields are inherited first
object.omit string[] no Field names to drop from the extends base before applying own properties

Composition (extends / omit)

Resolution order: base extends fields → omit removals → own properties (own wins). Cycles throw ApiSchemaGenerationException.

objectName join tag

Every resource property that declares objectName: Address is the join key for this feature:

When a canonical file for Address exists:

When no canonical file exists, the inline properties block is used exactly as today (no change).

Validation

Field-level validation is authored in the parallel *.object.validation.yml using the same format as resource validation files. On a canonicalized property the reference site's own Collection constraint is superseded by an Assert\Valid cascade to the canonical class, which carries the field-level constraints.

Layer precedence

Layer detection uses the same path rules as resource files: /Pyz/ → project, /SprykerFeature/ → feature, else core. Merge precedence: project > feature > core — so a project can add one field to a feature-layer canonical without redefining the whole object.

Core ships no *.object.yml files. The feature is available for project, feature, and core layers; today only projects use it.

Generated output

One shared class per canonical object is emitted to Generated\Api\<ApiType>\<ObjectName> (e.g. Generated\Api\Storefront\Address). All resource classes that reference the canonical use this single shared class.


Schema and API class discovery

Schema files and Glue API classes are discovered by ApiDirectoryLocator at conventional, fixed-depth locations inside the configured source_directories — the filesystem is not scanned recursively.

Discovered layouts for resource schemas (resources/api/{apiType}):

Discovered layouts for API classes (Glue/{Module}/Api/{ApiType}):

The following invariants are enforced by the locator and pinned by unit tests (ApiDirectoryLocatorTest, SchemaFileDiscoveryTest, SprykerApiPlatformBundleTest) — keep them in mind when changing discovery:

Resource class index (compile-time metadata)

The container compiler pass ResourceClassIndexPass scans the generated resources of each configured API type and compiles an index of every resource's short name, class, and includedSortPriority extra property into the container parameter spryker_api_platform.resource_class_index, grouped by base resource class with the code bucket as inner key ('' for the base resource). Runtime consumers (ResourceClassIndexProvider for short-name-to-class lookups, CodeBucketResourceNameCollectionFactory for code bucket filtering) read that parameter — an opcache-served part of the compiled container with zero per-request reflection.

Contracts:

Serializer decorators

CXmlEncoder and CXmlNormalizer decorate serializer-aware services (serializer.encoder.xml, api_platform.serializer.normalizer.item) and therefore take their place in the serializer chain. Two contracts apply to these (and any future) serializer decorators; both were the source of production bugs and are pinned by CXmlSerializerAwarenessTest and CXmlNormalizerDelegationTest:

Documentation

The authoritative documentation lives in spryker-docs. Start here:


All versions of api-platform with dependencies

PHP Build Version
Package Version
Requires api-platform/api-pack Version ^1.4.0
api-platform/doctrine-common Version ^4.3.0
api-platform/doctrine-orm Version ^4.3.0
api-platform/documentation Version ^4.3.0
api-platform/hal Version ^4.3.0
api-platform/http-cache Version ^4.3.0
api-platform/hydra Version ^4.3.0
api-platform/json-api Version ^4.3.0
api-platform/json-schema Version ^4.3.0
api-platform/jsonld Version ^4.3.0
api-platform/metadata Version ^4.3.0
api-platform/openapi Version ^4.3.0
api-platform/serializer Version ^4.3.0
api-platform/state Version ^4.3.0
api-platform/symfony Version ^4.3.0
api-platform/validator Version ^4.3.0
friendsofcxml/cxml-php Version ^2.0.0
php Version >=8.3
spryker/doctrine-inflector Version ^1.0.0 || ^2.0.0
spryker/entity-tag Version ^1.0.0
spryker/glossary-storage Version ^1.0.0
spryker/kernel Version ^3.48.0
spryker/locale Version ^4.0.0
spryker/log Version ^3.0.0
spryker/oauth Version ^2.0.0
spryker/store Version ^1.0.0
spryker/transfer Version ^3.27.0
symfony/config Version ^6.0.0 || ^7.0.0
symfony/console Version ^6.0.0 || ^7.0.0
symfony/expression-language Version ^6.0.0 || ^7.0.0
symfony/finder Version ^6.0.0 || ^7.0.0
symfony/http-kernel Version ^6.0.0 || ^7.0.0
symfony/security-bundle Version ^6.0.0 || ^7.0.0
symfony/yaml Version ^6.0.0 || ^7.0.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 spryker/api-platform contains the following files

Loading the files please wait ...