{"id":18610578,"url":"https://github.com/ixnode/php-json-beautifier","last_synced_at":"2025-07-23T16:32:46.116Z","repository":{"id":46399457,"uuid":"406279323","full_name":"ixnode/php-json-beautifier","owner":"ixnode","description":"A fully working PHP sample project.","archived":false,"fork":false,"pushed_at":"2021-10-16T21:48:53.000Z","size":146,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T01:41:39.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ixnode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null}},"created_at":"2021-09-14T08:06:54.000Z","updated_at":"2022-07-28T18:49:00.000Z","dependencies_parsed_at":"2022-09-07T03:52:35.149Z","dependency_job_id":null,"html_url":"https://github.com/ixnode/php-json-beautifier","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fphp-json-beautifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fphp-json-beautifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fphp-json-beautifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fphp-json-beautifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ixnode","download_url":"https://codeload.github.com/ixnode/php-json-beautifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239400606,"owners_count":19632051,"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-11-07T03:11:07.118Z","updated_at":"2025-02-18T03:18:56.775Z","avatar_url":"https://github.com/ixnode.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHPJsonBeautifier\n\n[![CI workflow](https://github.com/ixnode/php-json-beautifier/actions/workflows/ci-workflow.yml/badge.svg?branch=main)](https://github.com/ixnode/php-json-beautifier/actions/workflows/ci-workflow.yml)\n[![Release](https://img.shields.io/github/v/release/ixnode/php-json-beautifier)](https://github.com/ixnode/php-json-beautifier/releases)\n[![PHP](https://img.shields.io/badge/PHP-^8.0-777bb3.svg?logo=php\u0026logoColor=white\u0026labelColor=555555\u0026style=flat)](https://www.php.net/supported-versions.php)\n[![PHPStan](https://img.shields.io/badge/PHPStan-Level%208-brightgreen.svg?style=flat)](https://phpstan.org/user-guide/rule-levels)\n[![PHPStan](https://img.shields.io/badge/PHPCS-PSR12-brightgreen.svg?style=flat)](https://www.php-fig.org/psr/psr-12/)\n[![LICENSE](https://img.shields.io/github/license/ixnode/php-json-beautifier)](https://github.com/ixnode/php-json-beautifier/blob/master/LICENSE.md)\n\nAn example project that uses the following techniques:\n\n* [Symfony 5.3](https://symfony.com/doc/current/create_framework/introduction.html)\n* [PHP 8.0](https://www.php.net/releases/8.0/de.php)\n* [PHPUnit 9.5](https://phpunit.readthedocs.io/en/9.5/)\n* [PHPStan 0.12](https://phpstan.org/)\n* [GitHub](https://github.com/ixnode)\n* [Docker Hub](https://hub.docker.com/repository/docker/ixnode/php)\n* [CI/CD Integration with GitHub](https://docs.github.com/en/actions/guides/about-continuous-integration)\n* [Semantic Versioning 2.0.0](https://semver.org/lang/de/)\n\n## Run the app\n\n\n\n### Create a `docker-compose.yml`\n\nCreate a file named [`docker-compose.yml`](https://github.com/ixnode/php-json-beautifier/blob/main/build/docker-compose.yml) with the following content:\n\n```yaml\n# ===========================================\n# ❯ mkdir docker-compose \u0026\u0026 cd docker-compose\n# ❯ vi docker-compose.yml\n# ===========================================\n\nversion: \"3.8\"\n\n# Configure services\nservices:\n\n  # Nginx to serve the app.\n  nginx:\n    image: \"nginx:latest\"\n    container_name: \"de.ixno.php-json-beautifier.nginx\"\n    hostname: \"de-ixno-php-json-beautifier-nginx\"\n    restart: always\n    ports:\n      - 8000:80\n    volumes:\n      # Server static pages (uses the data from php service)\n      - data:/var/www/web\n      # Add nginx configuration (uses the data from php service)\n      - nginx_config:/etc/nginx/conf.d\n    depends_on:\n      - php\n      - composer\n\n  # Use ixnode/php-json-beautifier:latest image (originated from image php:8.0.11-fpm) with the data it contains\n  php:\n    image: \"ixnode/php-json-beautifier:latest\"\n    container_name: \"de.ixno.php-json-beautifier.php\"\n    hostname: \"de-ixno-php-json-beautifier-php\"\n    restart: always\n    volumes:\n      # This container shares the folder /var/www/web via volume data, because the container starts\n      # first and the content already exists\n      - data:/var/www/web\n      # This container shares the folder /var/www/web/docker/nginx/conf.d via volume nginx_config, because\n      # the container starts first and the content already exists\n      - nginx_config:/var/www/web/docker/nginx/conf.d\n\n  # Composer image: This container is executed once and performs a composer install.\n  composer:\n    image: \"composer:latest\"\n    container_name: \"de.ixno.php-json-beautifier.composer\"\n    hostname: \"de-ixno-php-json-beautifier-composer\"\n    command: [\"composer\", \"install\"]\n    volumes:\n      - data:/app # This container shares the folder /app via volume data, because it already exists\n\n# Configure volumes\nvolumes:\n  data:\n    name: \"de.ixno.php-json-beautifier.volume.data\"\n  nginx_config:\n    name: \"de.ixno.php-json-beautifier.volume.nginx.config\"\n```\n\n### Create a `.env` file\n\nIf you like nicely named projects, use the .env file\n\n```bash\n# @see https://docs.docker.com/compose/reference/envvars/#compose_project_name\n# ❯ vi docker-compose/.env\nCOMPOSE_PROJECT_NAME=de-ixno-php-json-beautifier\n```\n\n### Start containers\n\n```bash\n❯ docker-compose up -d\n```\n\n### Open browser\n\n* http://localhost:8000/\n\n### Or use command line\n\n#### Via parameter\n\n```bash\n❯ docker-compose exec php bin/console app:json:beautify '{\"value\": \"123\"}'\n```\n\n```json\n{\n    \"value\": \"123\"\n}\n```\n\n#### Via STDIN\n\n```bash\n❯ echo '{\"value\": \"123\"}' | docker-compose exec php bin/console app:json:beautify\n```\n\n```json\n{\n    \"value\": \"123\"\n}\n```\n\n## Other tasks \n\n* [Build a new app with new version and push it to the repository](build/README.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixnode%2Fphp-json-beautifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fixnode%2Fphp-json-beautifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixnode%2Fphp-json-beautifier/lists"}