• Stars
    star
    171
  • Rank 222,266 (Top 5 %)
  • Language
    PHP
  • License
    BSD 3-Clause "New...
  • Created almost 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Skeleton application for creating laminas-mvc based projects.

laminas-mvc-skeleton

πŸ‡·πŸ‡Ί Русским Π³Ρ€Π°ΠΆΠ΄Π°Π½Π°ΠΌ

ΠœΡ‹, участники Laminas, Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ ΠΈ ΠΆΠΈΠ²Π΅ΠΌ Π² Ρ€Π°Π·Π½Ρ‹Ρ… странах. Π£ ΠΌΠ½ΠΎΠ³ΠΈΡ… ΠΈΠ· нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, родствСнники ΠΈ ΠΊΠΎΠ»Π»Π΅Π³ΠΈ ΠΊΠ°ΠΊ Π² России, Ρ‚Π°ΠΊ ΠΈ Π² Π£ΠΊΡ€Π°ΠΈΠ½Π΅. НСкоторыС ΠΈΠ· нас Ρ€ΠΎΠ΄ΠΈΠ»ΠΈΡΡŒ Π² России. НСкоторыС ΠΈΠ· нас ΠΆΠΈΠ²ΡƒΡ‚ Π² России. Π£ Π½Π΅ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… Π±Π°Π±ΡƒΡˆΠΊΠΈ ΠΈ Π΄Π΅Π΄ΡƒΡˆΠΊΠΈ ΡΡ€Π°ΠΆΠ°Π»ΠΈΡΡŒ с Ρ„Π°ΡˆΠΈΡΡ‚Π°ΠΌΠΈ Π²ΠΎ Π’Ρ‚ΠΎΡ€ΠΎΠΉ ΠΌΠΈΡ€ΠΎΠ²ΠΎΠΉ Π²ΠΎΠΉΠ½Π΅. Π—Π΄Π΅ΡΡŒ Π½ΠΈΠΊΡ‚ΠΎ Π½Π΅ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΈΠ²Π°Π΅Ρ‚ Ρ„Π°ΡˆΠΈΠ·ΠΌ.

Π£ ΠΎΠ΄Π½ΠΎΠ³ΠΎ ΠΈΠ· нас Π΅ΡΡ‚ΡŒ украинская родствСнница, которая спаслась ΠΈΠ· Π΄ΠΎΠΌΠ° вмСстС с сыном. ПоСзд задСрТался ΠΈΠ·-Π·Π° Π±ΠΎΠΌΠ±Π΅ΠΆΠΊΠΈ Π½Π° Π΄ΠΎΡ€ΠΎΠ³Π΅ Π²ΠΏΠ΅Ρ€Π΅Π΄ΠΈ. Π£ нас Π΅ΡΡ‚ΡŒ Π΄Ρ€ΡƒΠ·ΡŒΡ, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ прячутся Π² Π±ΠΎΠΌΠ±ΠΎΡƒΠ±Π΅ΠΆΠΈΡ‰Π°Ρ…. ΠœΡ‹ с Ρ‚Ρ€Π΅Π²ΠΎΠ³ΠΎΠΉ ΠΆΠ΄Π΅ΠΌ вСсточки ΠΎΡ‚ Π½ΠΈΡ… послС Π²ΠΎΠ·Π΄ΡƒΡˆΠ½Ρ‹Ρ… Π½Π°Π»Π΅Ρ‚ΠΎΠ², ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ бСспорядочно наносят ΡƒΠ΄Π°Ρ€Ρ‹ ΠΈ ΠΏΠΎΠΏΠ°Π΄Π°ΡŽΡ‚ ΠΏΠΎ Π±ΠΎΠ»ΡŒΠ½ΠΈΡ†Π°ΠΌ, школам, дСтским садам ΠΈ Π΄ΠΎΠΌΠ°ΠΌ. ΠœΡ‹ Π½Π΅ Π±Π΅Ρ€Π΅ΠΌ это ΠΈΠ· ΠΊΠ°ΠΊΠΈΡ…-Π»ΠΈΠ±ΠΎ БМИ. ΠœΡ‹ наблюдаСм это Π½Π°ΠΏΡ€ΡΠΌΡƒΡŽ.

Π’Ρ‹ довСряСтС Π½Π°ΠΌ достаточно, Ρ‡Ρ‚ΠΎΠ± ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ наши ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹, ΠΈ ΠΌΡ‹ просим вас Π΄ΠΎΠ²Π΅Ρ€ΠΈΡ‚ΡŒΡΡ Π½Π°ΠΌ вновь. ΠœΡ‹ нуТдаСмся Π² ΠΏΠΎΠΌΠΎΡ‰ΠΈ. Π’Ρ‹Ρ…ΠΎΠ΄ΠΈΡ‚Π΅ ΠΈ протСстуйтС ΠΏΡ€ΠΎΡ‚ΠΈΠ² этой бСсполСзной Π²ΠΎΠΉΠ½Ρ‹. ΠžΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚Π΅ ΠΊΡ€ΠΎΠ²ΠΎΠΏΡ€ΠΎΠ»ΠΈΡ‚ΠΈΠ΅. Π‘ΠΊΠ°ΠΆΠΈΡ‚Π΅ "НСт Π²ΠΎΠΉΠ½Π΅!"

πŸ‡ΊπŸ‡Έ To Citizens of Russia

We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.

One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.

You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"

Introduction

This is a skeleton application using the Laminas MVC layer and module systems. This application is meant to be used as a starting place for those looking to get their feet wet with Laminas MVC.

Installation using Composer

The easiest way to create a new Laminas MVC project is to use Composer. If you don't have it already installed, then please install as per the documentation.

To create your new Laminas MVC project:

$ composer create-project -sdev laminas/laminas-mvc-skeleton path/to/install

Once installed, you can test it out immediately using PHP's built-in web server:

$ cd path/to/install
$ php -S 0.0.0.0:8080 -t public
# OR use the composer alias:
$ composer serve

This will start the cli-server on port 8080, and bind it to all network interfaces. You can then visit the site at http://localhost:8080/

  • which will bring up Laminas MVC Skeleton welcome page.

Note: The built-in CLI server is for development only.

Development mode

The skeleton ships with laminas-development-mode by default, and provides three aliases for consuming the script it ships with:

$ composer development-enable  # enable development mode
$ composer development-disable # disable development mode
$ composer development-status  # whether or not development mode is enabled

You may provide development-only modules and bootstrap-level configuration in config/development.config.php.dist, and development-only application configuration in config/autoload/development.local.php.dist. Enabling development mode will copy these files to versions removing the .dist suffix, while disabling development mode will remove those copies.

Development mode is automatically enabled as part of the skeleton installation process. After making changes to one of the above-mentioned .dist configuration files you will either need to disable then enable development mode for the changes to take effect, or manually make matching updates to the .dist-less copies of those files.

Running Unit Tests

To run the supplied skeleton unit tests, you need to do one of the following:

  • During initial project creation, select to install the MVC testing support.

  • After initial project creation, install laminas-test:

    $ composer require --dev laminas/laminas-test

Once testing support is present, you can run the tests using:

$ ./vendor/bin/phpunit

If you need to make local modifications for the PHPUnit test setup, copy phpunit.xml.dist to phpunit.xml and edit the new file; the latter has precedence over the former when running tests, and is ignored by version control. (If you want to make the modifications permanent, edit the phpunit.xml.dist file.)

Running Psalm Static Analysis

To run the supplied skeleton static analysis, you need to do one of the following: It is recommended to install the test components from laminas (laminas/laminas-test), as this is used in the tests supplied.

$ composer require --dev vimeo/psalm psalm/plugin-phpunit laminas/laminas-test

Once psalm support is present, you can run the static analysis using:

$ composer static-analysis

Using docker-compose

This skeleton provides a docker-compose.yml for use with docker-compose; it uses the provided Dockerfile to build a docker image for the laminas container created with docker-compose.

Build and start the image and container using:

$ docker-compose up -d --build

At this point, you can visit http://localhost:8080 to see the site running.

You can also run commands such as composer in the container. The container environment is named "laminas" so you will pass that value to docker-compose run:

$ docker-compose run laminas composer install

Some composer packages optionally use additional PHP extensions.
The Dockerfile contains several commented-out commands which enable some of the more popular php extensions. For example, to install pdo-pgsql support for laminas/laminas-db uncomment the lines:

# RUN apt-get install --yes libpq-dev \
#     && docker-php-ext-install pdo_pgsql

then re-run the docker-compose up -d --build line as above.

You may also want to combine the various apt-get and docker-php-ext-* statements later to reduce the number of layers created by your image.

Web server setup

Apache setup

To setup apache, setup a virtual host to point to the public/ directory of the project and you should be ready to go! It should look something like below:

<VirtualHost *:80>
    ServerName laminasapp.localhost
    DocumentRoot /path/to/laminasapp/public
    <Directory /path/to/laminasapp/public>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
        <IfModule mod_authz_core.c>
        Require all granted
        </IfModule>
    </Directory>
</VirtualHost>

Nginx setup

To setup nginx, open your /path/to/nginx/nginx.conf and add an include directive below into http block if it does not already exist:

http {
    # ...
    include sites-enabled/*.conf;
}

Create a virtual host configuration file for your project under /path/to/nginx/sites-enabled/laminasapp.localhost.conf it should look something like below:

server {
    listen       80;
    server_name  laminasapp.localhost;
    root         /path/to/laminasapp/public;

    location / {
        index index.php;
        try_files $uri $uri/ @php;
    }

    location @php {
        # Pass the PHP requests to FastCGI server (php-fpm) on 127.0.0.1:9000
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_param  SCRIPT_FILENAME /path/to/laminasapp/public/index.php;
        include fastcgi_params;
    }
}

Restart the nginx, now you should be ready to go!

QA Tools

The skeleton does not come with any QA tooling by default, but does ship with configuration for each of:

Additionally, it comes with some basic tests for the shipped Application\Controller\IndexController.

If you want to add these QA tools, execute the following:

$ composer require --dev squizlabs/php_codesniffer laminas/laminas-test

We provide aliases for each of these tools in the Composer configuration:

# Run CS checks:
$ composer cs-check
# Fix CS errors:
$ composer cs-fix
# Run PHPUnit tests:
$ composer test

More Repositories

1

laminas-code

Extensions to the PHP Reflection API, static code scanning, and code generation
PHP
1,843
star
2

laminas-zendframework-bridge

Alias legacy ZF class names to Laminas Project equivalents.
PHP
1,185
star
3

laminas-eventmanager

Trigger and listen to events within a PHP application
PHP
1,014
star
4

laminas-diactoros

PSR HTTP Message implementations
PHP
472
star
5

laminas-stdlib

SPL extensions, array utilities, error handlers, and more
PHP
190
star
6

laminas-escaper

Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs
PHP
189
star
7

laminas-servicemanager

Factory-Driven Dependency Injection Container
PHP
149
star
8

laminas-mvc

Laminas's event-driven MVC layer, including MVC Applications, Controllers, and Plugins
PHP
142
star
9

automatic-releases

Automated release process for `laminas/` projects, usable as github action
PHP
140
star
10

laminas-feed

Consume and generate Atom and RSS feeds, and interact with Pubsubhubbub.
PHP
139
star
11

laminas-validator

Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria
PHP
128
star
12

laminas-hydrator

Serialize objects to arrays, and vice versa
PHP
123
star
13

laminas-db

Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations
PHP
119
star
14

laminas-cache

Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output
PHP
100
star
15

laminas-mail

Provides generalized functionality to compose and send both text and MIME-compliant multipart e-mail messages
PHP
94
star
16

laminas-form

Validate and display simple and complex forms, casting forms to business objects and vice versa
PHP
80
star
17

laminas-filter

Programmatically filter and normalize data and files
PHP
79
star
18

laminas-view

Flexible view layer supporting and providing multiple view layers, helpers, and more
PHP
74
star
19

getlaminas.org

getlaminas.org source code
PHP
68
star
20

laminas-httphandlerrunner

Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.
PHP
63
star
21

laminas-migration

Migrate Zend Framework MVC applications, Expressive applications, Apigility applications, or third-party libraries to target Laminas.
PHP
62
star
22

laminas-soap

PHP
58
star
23

laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines
PHP
55
star
24

laminas-diagnostics

A set of components for performing diagnostic tests in PHP applications
PHP
55
star
25

laminas-session

Object-oriented interface to PHP sessions and storage
PHP
55
star
26

laminas-cli

Console command runner, exposing commands written in Laminas MVC and Mezzio components and applications
PHP
55
star
27

laminas-text

Create FIGlets and text-based tables
PHP
53
star
28

laminas-config

provides a nested object property based user interface for accessing this configuration data within application code
PHP
48
star
29

laminas-i18n

Provide translations for your application, and filter and validate internationalized values
PHP
47
star
30

laminas-inputfilter

Normalize and validate input sets from the web, APIs, the CLI, and more, including files
PHP
42
star
31

technical-steering-committee

Laminas Project Technical Steering Committee organization and processes.
39
star
32

laminas-crypt

Strong cryptography tools and password hashing
PHP
39
star
33

laminas-json

provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP
PHP
37
star
34

laminas-uri

A component that aids in manipulating and validating Β» Uniform Resource Identifiers (URIs)
PHP
37
star
35

laminas-di

Automated dependency injection for PSR-11 containers
PHP
36
star
36

laminas-http

Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests
PHP
36
star
37

laminas-router

Flexible routing system for HTTP and console applications
PHP
34
star
38

laminas-dependency-plugin

Replace zendframework and zfcampus packages with their Laminas Project equivalents.
PHP
33
star
39

laminas-serializer

Serialize and deserialize PHP structures to a variety of representations
PHP
33
star
40

tutorials

Learn how to create laminas-mvc applications, get in-depth guides into components, and discover how to migrate your applications to version 3!
33
star
41

laminas-permissions-acl

Provides a lightweight and flexible access control list (ACL) implementation for privileges management
PHP
32
star
42

laminas-coding-standard

The coding standard ruleset for Laminas components.
PHP
32
star
43

laminas-permissions-rbac

Provides a role-based access control management
PHP
30
star
44

laminas-modulemanager

Modular application system for laminas-mvc applications
PHP
30
star
45

laminas-mime

Create and parse MIME messages and parts
PHP
29
star
46

laminas-loader

Autoloading and plugin loading strategies
PHP
27
star
47

laminas-component-installer

Composer plugin for injecting modules and configuration providers into application configuration
PHP
27
star
48

laminas-math

Create cryptographically secure pseudo-random numbers, and manage big integers
PHP
26
star
49

laminas-log

Robust, composite logger with filtering, formatting, and PSR-3 support
PHP
26
star
50

laminas-server

Create Reflection-based RPC servers
PHP
25
star
51

laminas-barcode

Programmatically create and render barcodes as images or in PDFs
PHP
25
star
52

laminas-paginator

Paginate collections of data from arbitrary sources
PHP
25
star
53

laminas-xmlrpc

Fully-featured XML-RPC server and client implementations
PHP
24
star
54

laminas-developer-tools

Module for developer and debug tools for use with laminas-mvc applications.
PHP
24
star
55

laminas-captcha

Generate and validate CAPTCHAs using Figlets, images, ReCaptcha, and more
PHP
24
star
56

laminas-authentication

provides an API for authentication and includes concrete authentication adapters for common use case scenarios
PHP
24
star
57

laminas-ci-matrix-action

GitHub Action for creating a CI job matrix.
TypeScript
24
star
58

laminas-skeleton-installer

Installer plugin for Laminas MVC Skeleton application
PHP
23
star
59

laminas-config-aggregator

Lightweight library for collecting and merging configuration from different sources
PHP
23
star
60

laminas-mvc-middleware

Dispatch middleware pipelines in place of controllers in laminas-mvc.
PHP
23
star
61

laminas-continuous-integration-action

GitHub Action for running a QA check
Shell
19
star
62

laminas-development-mode

Laminas development mode script
PHP
17
star
63

laminas-dom

provides tools for working with DOM documents and structures
PHP
17
star
64

laminas-navigation

Manage trees of pointers to web pages in order to build navigation systems
PHP
17
star
65

laminas-json-server

Laminas Json-Server is a JSON-RPC server implementation.
PHP
17
star
66

laminas-xml

Utility library for XML usage, best practices, and security in PHP
PHP
14
star
67

laminas-mvc-i18n

Integration between laminas-mvc and laminas-i18n
PHP
14
star
68

laminas-file

Locate PHP classfiles
PHP
14
star
69

laminas.github.io

Source code for landing page and assets of https://docs.laminas.dev
HTML
14
star
70

laminas-test

Tools to facilitate integration testing of laminas-mvc applications
PHP
14
star
71

laminas-xml2json

Provides functionality for converting XML to JSON, optionally including XML attributes
PHP
13
star
72

laminas.dev

Developer website for Laminas https://www.laminas.dev
PHP
13
star
73

laminas-psr7bridge

PSR-7 <-> laminas-http message conversions
PHP
12
star
74

laminas-recaptcha

OOP wrapper for the ReCaptcha web service
PHP
11
star
75

laminas-mvc-plugin-flashmessenger

Plugin for creating and exposing flash messages via laminas-mvc controllers
PHP
10
star
76

documentation

Documentation repository for the Laminas Project components.
10
star
77

laminas-mvc-plugin-identity

Plugin for retrieving the current authenticated identity within laminas-mvc controllers
PHP
10
star
78

laminas-pimple-config

PSR-11 Pimple container configurator for Laminas and Mezzio applications
PHP
10
star
79

laminas-twitter

OOP wrapper for the Twitter web service
PHP
9
star
80

laminas-mvc-plugin-fileprg

Post/Redirect/Get plugin with file upload handling for laminas-mvc controllers
PHP
9
star
81

laminas-progressbar

Create and update progress bars in different environments
PHP
9
star
82

laminas-i18n-resources

Provides validator and captcha translations for laminas-i18n's Translator
PHP
9
star
83

laminas-config-aggregator-parameters

PostProcessor extension for laminas/laminas-config-aggregator to allow usage of templated parameters within your configuration
PHP
9
star
84

laminas-servicemanager-inspector

Make your autowiring reliable
PHP
8
star
85

laminas-ldap

Provides support for LDAP operations including but not limited to binding, searching and modifying entries in an LDAP directory
PHP
8
star
86

laminas-oauth

PHP
8
star
87

laminas-cache-storage-adapter-redis

PHP
8
star
88

laminas-console

Build console applications using getopt syntax or routing, complete with prompts
PHP
8
star
89

laminas-mvc-plugin-prg

Post/Redirect/Get plugin for laminas-mvc controllers
PHP
8
star
90

laminas-mvc-plugins

Collection of all stable laminas-mvc plugins served via separate packages.
7
star
91

laminas-composer-autoloading

Sets up Composer-based autoloading for your Laminas modules
PHP
7
star
92

laminas-cache-storage-adapter-filesystem

PHP
7
star
93

laminas-servicemanager-migration

Migrate your code to laminas-servicemanager 4.x compatibility utilizing Rector rules.
PHP
7
star
94

repo-template

Template repository for new Laminas components
PHP
6
star
95

laminas-tag

Manipulate and weight taggable items, and create tag clouds
PHP
6
star
96

laminas-mvc-form

Metapackage with all requirements needed to use laminas-form with laminas-mvc.
6
star
97

laminas-memory

Manage data in an environment with limited memory
PHP
6
star
98

.github

Laminas Organization Templates
5
star
99

laminas-cache-storage-adapter-memory

PHP
5
star
100

laminas-container-config-test

Mezzio PSR-11 container configuration tests
PHP
5
star