Download the PHP package spryker/architecture-sniffer without Composer

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

Architecture Sniffer

CI Coverage Latest Stable Version Minimum PHP Version License Total Downloads

Architecture Sniffer for Spryker core, eco-system and applications.

The package ships two independent rulesets. Use the one that matches what you are working on:

Ruleset For Path
Core Spryker core, eco-system and module development vendor/spryker/architecture-sniffer/src/ruleset.xml
Project Application (project) development vendor/spryker/architecture-sniffer/src/Project/ruleset.xml

Make sure the sniffer is installed as a require-dev dependency:

Common to both: lower priorities (higher numbers) always include the higher priorities (lower numbers) — a run at priority 3 also reports 1 and 2.

Spryker Core Development

Use the core ruleset src/ruleset.xml.

Priority Levels

We use and recommend minimum priority 2 by default for local and CI checks.

Usage

When using Spryker you can use the Spryker CLI console command:

Verbose output is recommended here.

Or run it manually:

Including the sniffer in PHPStorm

Add a new custom ruleset under Editor -> Inspections -> PHP -> PHP Mess Detector validation and name it Architecture Sniffer. The ruleset is defined in vendor/spryker/architecture-sniffer/src/ruleset.xml.

Under Framework & Languages -> PHP -> Mess Detector set the path to your phpmd (vendor/bin/phpmd), then run Validate to confirm it works.

Spryker Project Development

Use the project ruleset src/Project/ruleset.xml. It bundles adapted PHPMD, Spryker architecture, and project-only rules.

Priority Levels

Recommended minimum priority per project maturity:

Usage

Setup for the project & customizing rules

The project ruleset is meant to be tuned per project. Create a thin project-level phpmd.xml in the project root (PHPMD's conventional default filename) that references the vendor project ruleset, then layer your customizations on top of it — exclude modules, change priorities, or adjust rule properties without touching the vendor package:

After that, run phpmd against your project-level ruleset instead of the vendor one, and change it freely for project needs:

The commands below use this project-level path.

Local Code Review Usage

For a local review, save the report to JSON and format it into a grouped, human-readable summary.

Save the report (scan all priorities for an AI-assisted review):

or

Format it:

Without <output.txt> the formatted report is printed to stdout.

Baseline

Adopt the ruleset on an existing project without refactoring legacy code first: generate a baseline of the current violations and only fail on new ones.

Use --update-baseline to drop violations that no longer exist. Store the baseline in version control and shrink it over time.

Debugging

Enable Xdebug for phpmd to step through rule code:

Writing new sniffs

Add them to inside src folder and add tests in tests with the same folder structure. Don't forget to update ruleset.xml.

Every sniff needs a description as full sentence:

Every sniff needs to implement either the ClassAware, FunctionAware, InterfaceAware, or MethodAware interface to be recognised. To validate that sniffer recognises your rule, check if your rule is listed in Zed UI > Maintenance > Architecture sniffer.

Also note:

Setup

Run

and

Testing

Don't forget to test your changes:

Running code-sniffer on this project

Make sure this repository is Spryker coding standard conform:

If you want to fix the fixable errors, use

Once everything is green you can make a PR with your changes.


All versions of architecture-sniffer with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
laminas/laminas-config Version ^2.5.1 || ^3.1.0
laminas/laminas-filter Version ^2.5.1
phpdocumentor/reflection-docblock Version ^5.3.0
phpmd/phpmd Version ^2.10.0
symfony/finder Version ^4.0.0 || ^5.0.0 || ^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/architecture-sniffer contains the following files

Loading the files please wait ...