{"id":13652759,"url":"https://github.com/zfcampus/zf-apigility-skeleton","last_synced_at":"2025-04-23T03:31:22.722Z","repository":{"id":57090455,"uuid":"12139906","full_name":"zfcampus/zf-apigility-skeleton","owner":"zfcampus","description":null,"archived":true,"fork":false,"pushed_at":"2020-01-20T17:32:46.000Z","size":2592,"stargazers_count":444,"open_issues_count":20,"forks_count":123,"subscribers_count":60,"default_branch":"master","last_synced_at":"2024-11-06T10:53:34.289Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zfcampus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-15T17:48:59.000Z","updated_at":"2024-10-06T17:25:41.000Z","dependencies_parsed_at":"2022-08-20T16:50:12.403Z","dependency_job_id":null,"html_url":"https://github.com/zfcampus/zf-apigility-skeleton","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfcampus%2Fzf-apigility-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfcampus%2Fzf-apigility-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfcampus%2Fzf-apigility-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfcampus%2Fzf-apigility-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zfcampus","download_url":"https://codeload.github.com/zfcampus/zf-apigility-skeleton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223909942,"owners_count":17223587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T02:01:02.388Z","updated_at":"2024-11-10T03:31:21.594Z","avatar_url":"https://github.com/zfcampus.png","language":"PHP","funding_links":[],"categories":[" REST API","Servers","REST和API","REST and API","Table of Contents","Application Skeleton"],"sub_categories":["PHP","API"],"readme":"Apigility Skeleton Application\n==============================\n\n\u003e ## Repository abandoned 2019-12-31\n\u003e\n\u003e This repository has moved to [laminas-api-tools/api-tools-skeleton](https://github.com/laminas-api-tools/api-tools-skeleton).\n\nRequirements\n------------\n\nPlease see the [composer.json](composer.json) file.\n\nInstallation\n------------\n\n### Via release tarball\n\nGrab the latest release via the [Apigility website](http://apigility.org/)\nand/or the [releases page](https://github.com/zfcampus/zf-apigility-skeleton/releases); each release\nhas distribution tarballs and zipballs available.\n\nUntar it:\n\n```bash\n$ tar xzf zf-apigility-skeleton-{version}.tgz\n```\n\n(Where `{version}` is the version you downloaded.)\n\nOr unzip, if you chose the zipball:\n\n```bash\n$ unzip zf-apigility-skeleton-{version}.zip\n```\n\n(Where `{version}` is the version you downloaded.)\n\n### Via Composer (create-project)\n\nYou can use the `create-project` command from [Composer](http://getcomposer.org/)\nto create the project in one go (you need to install [composer](https://getcomposer.org/doc/00-intro.md#downloading-the-composer-executable)):\n\n```bash\n$ curl -s https://getcomposer.org/installer | php -- --filename=composer\n$ composer create-project -sdev zfcampus/zf-apigility-skeleton path/to/install\n```\n\n### Via Git (clone)\n\nFirst, clone the repository:\n\n```bash\n# git clone https://github.com/zfcampus/zf-apigility-skeleton.git # optionally, specify the directory in which to clone\n$ cd path/to/install\n```\n\nAt this point, you need to use [Composer](https://getcomposer.org/) to install\ndependencies. Assuming you already have Composer:\n\n```bash\n$ composer install\n```\n\n### All methods\n\nOnce you have the basic installation, you need to put it in development mode:\n\n```bash\n$ cd path/to/install\n$ composer development-enable\n```\n\nNow, fire it up! Do one of the following:\n\n- Create a vhost in your web server that points the DocumentRoot to the\n  `public/` directory of the project\n- Fire up the built-in web server in PHP(**note**: do not use this for\n  production!)\n\nIn the latter case, do the following:\n\n```bash\n$ cd path/to/install\n$ php -S 0.0.0.0:8080 -ddisplay_errors=0 -t public public/index.php\n# OR use the composer alias:\n$ composer serve\n```\n\nYou can then visit the site at http://localhost:8080/ - which will bring up a\nwelcome page and the ability to visit the dashboard in order to create and\ninspect your APIs.\n\n### NOTE ABOUT USING APACHE\n\nApache forbids the character sequences `%2F` and `%5C` in URI paths. However, the Apigility Admin\nAPI uses these characters for a number of service endpoints. As such, if you wish to use the\nAdmin UI and/or Admin API with Apache, you will need to configure your Apache vhost/project to\nallow encoded slashes:\n\n```apacheconf\nAllowEncodedSlashes On\n```\n\nThis change will need to be made in your server's vhost file (it cannot be added to `.htaccess`).\n\n### NOTE ABOUT OPCACHE\n\n**Disable all opcode caches when running the admin!**\n\nThe admin cannot and will not run correctly when an opcode cache, such as APC or\nOpCache, is enabled. Apigility does not use a database to store configuration;\ninstead, it uses PHP configuration files. Opcode caches will cache these files\non first load, leading to inconsistencies as you write to them, and will\ntypically lead to a state where the admin API and code become unusable.\n\nThe admin is a **development** tool, and intended for use a development\nenvironment. As such, you should likely disable opcode caching, regardless.\n\nWhen you are ready to deploy your API to **production**, however, you can\ndisable development mode, thus disabling the admin interface, and safely run an\nopcode cache again. Doing so is recommended for production due to the tremendous\nperformance benefits opcode caches provide.\n\n### NOTE ABOUT DISPLAY_ERRORS\n\nThe `display_errors` `php.ini` setting is useful in development to understand what warnings,\nnotices, and error conditions are affecting your application. However, they cause problems for APIs:\nAPIs are typically a specific serialization format, and error reporting is usually in either plain\ntext, or, with extensions like XDebug, in HTML. This breaks the response payload, making it unusable\nby clients.\n\nFor this reason, we recommend disabling `display_errors` when using the Apigility admin interface.\nThis can be done using the `-ddisplay_errors=0` flag when using the built-in PHP web server, or you\ncan set it in your virtual host or server definition. If you disable it, make sure you have\nreasonable error log settings in place. For the built-in PHP web server, errors will be reported in\nthe console itself; otherwise, ensure you have an error log file specified in your configuration.\n\n`display_errors` should *never* be enabled in production, regardless.\n\n### Vagrant\n\nIf you prefer to develop with Vagrant, there is a basic vagrant recipe included with this project.\n\nThis recipe assumes that you already have Vagrant installed. The virtual machine will try to use localhost:8080 by\ndefault, so if you already have a server on this port of your host machine, you need to shut down the conflicting\nserver first, or if you know how, you can reconfigure the ports in Vagrantfile.\n\nAssuming you have Vagrant installed and assuming you have no port conflicts, you can bring up the Vagrant machine\nwith the standard `up` command:\n\n```bash\n$ vagrant up\n```\n\nWhen the machine comes up, you can ssh to it with the standard ssh forward agent:\n\n```bash\n$ vagrant ssh\n```\n\nThe web root is inside the shared directory, which is at `/var/www`; this is\nalso the home directory for the vagrant issue, which will be the initial\ndirectory you land in once you connect via SSH.\n\nThe image installs composer during provisioning, meaning you can use it to\ninstall and update dependencies:\n\n```bash\n# Install dependencies:\n$ vagrant ssh -c 'composer install'\n# Update dependencies:\n$ vagrant ssh -c 'composer update'\n```\n\nYou can also manipulate development mode:\n\n```bash\n$ vagrant ssh -c 'composer development-enable'\n$ vagrant ssh -c 'composer development-disable'\n$ vagrant ssh -c 'composer development-status'\n```\n\n\u003e #### Vagrant and VirtualBox\n\u003e\n\u003e The vagrant image is based on `bento/ubuntu-16.04`. If you are using VirtualBox as\n\u003e a provider, you will need:\n\u003e\n\u003e - Vagrant 1.8.5 or later\n\u003e - VirtualBox 5.0.26 or later\n\nFor vagrant documentation, please refer to [vagrantup.com](https://www.vagrantup.com/)\n\n### Docker\n\nIf you develop or deploy using Docker, we provide configuration for you.\n\nPrepare your development environment using [docker compose](https://docs.docker.com/compose/install/):\n\n```bash\n$ git clone https://github.com/zfcampus/zf-apigility-skeleton\n$ cd zf-apigility-skeleton\n$ docker-compose build\n# Install dependencies via composer, if you haven't already:\n$ docker-compose run apigility composer install\n# Enable development mode:\n$ docker-compose run apigility composer development-enable\n```\n\nStart the container:\n\n```bash\n$ docker-compose up\n```\n\nAccess Apigility from `http://localhost:8080/` or `http://\u003cboot2docker ip\u003e:8080/` if on Windows or Mac.\n\nYou may also use the provided `Dockerfile` directly if desired.\n\nOnce installed, you can use the container to update dependencies:\n\n```bash\n$ docker-compose run apigility composer update\n```\n\nOr to manipulate development mode:\n\n```bash\n$ docker-compose run apigility composer development-enable\n$ docker-compose run apigility composer development-disable\n$ docker-compose run apigility composer development-status\n```\n\nQA Tools\n--------\n\nThe skeleton ships with minimal QA tooling by default, including\nzendframework/zend-test. We supply basic tests for the shipped\n`Application\\Controller\\IndexController`.\n\nWe also ship with configuration for [phpcs](https://github.com/squizlabs/php_codesniffer).\nIf you wish to add this QA tool, execute the following:\n\n```bash\n$ composer require --dev squizlabs/php_codesniffer\n```\n\nWe provide aliases for each of these tools in the Composer configuration:\n\n```bash\n# Run CS checks:\n$ composer cs-check\n# Fix CS errors:\n$ composer cs-fix\n# Run PHPUnit tests:\n$ composer test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfcampus%2Fzf-apigility-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzfcampus%2Fzf-apigility-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfcampus%2Fzf-apigility-skeleton/lists"}