{"id":15168860,"url":"https://github.com/mmirzaee/opening-hours","last_synced_at":"2026-01-24T03:08:07.934Z","repository":{"id":213232143,"uuid":"286564239","full_name":"mmirzaee/opening-hours","owner":"mmirzaee","description":"A Rest API for managing open hours","archived":false,"fork":false,"pushed_at":"2020-08-16T22:46:46.000Z","size":184,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T05:44:37.251Z","etag":null,"topics":["api-test","rest-api","test","yii"],"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/mmirzaee.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-10T19:42:31.000Z","updated_at":"2020-08-16T22:46:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"8a7a71ca-d03c-41f8-afe5-136cf71929cf","html_url":"https://github.com/mmirzaee/opening-hours","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"bde1eee5e8f52aa46fc02d4d932c543dfc39c92c"},"previous_names":["mmirzaee/opening-hours"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mmirzaee/opening-hours","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmirzaee%2Fopening-hours","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmirzaee%2Fopening-hours/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmirzaee%2Fopening-hours/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmirzaee%2Fopening-hours/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmirzaee","download_url":"https://codeload.github.com/mmirzaee/opening-hours/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmirzaee%2Fopening-hours/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28709364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T23:51:44.727Z","status":"online","status_checked_at":"2026-01-24T02:00:06.909Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api-test","rest-api","test","yii"],"created_at":"2024-09-27T07:00:33.579Z","updated_at":"2026-01-24T03:08:07.920Z","avatar_url":"https://github.com/mmirzaee.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Rest API for managing open hours\n\nYou can do crud operations on entities, and also add weekly schedule of open hours.\nIt takes care of exception times (holidays) and overlapping (exceptions and open hours).\n\n## API Documentation\n\n- \u003ca href=\"https://documenter.getpostman.com/view/1900475/T1LPESo1?version=latest\"\u003eRestful API Documentation\u003c/a\u003e\n\nMain directories\n-------------------\n\n      config/             contains application configurations\n      controllers/        contains Web controller classes\n      models/             contains model classes\n      tests/              contains various tests for the basic application\n\n\n\nREQUIREMENTS\n------------\n\nPHP Version \u003e= 7.1.0.\n\n\nINSTALLATION\n------------\n\n### Install Manually\n\n1. Clone the project\n2. Run composer install\n3. Once the project creation procedure completed, edit db config and run the `./yii migrate` command to create the required tables.\n\n\n### Install with Docker\n\nUpdate your vendor packages\n\n    docker-compose run --rm php composer update --prefer-dist\n    \nRun the installation triggers (creating cookie validation code)\n\n    docker-compose run --rm php composer install    \n    \nStart the container\n\n    docker-compose up -d\n    \nYou can then access the application through the following URL:\n\n    http://127.0.0.1:8000\n\n**NOTES:** \n- Minimum required Docker engine version `17.04` for development (see [Performance tuning for volume mounts](https://docs.docker.com/docker-for-mac/osxfs-caching/))\n\n\nCONFIGURATION\n-------------\n\n### Database\n\nEdit the file `config/db.php` with real data, for example:\n\n```php\nreturn [\n    'class' =\u003e 'yii\\db\\Connection',\n    'dsn' =\u003e 'mysql:host=localhost;dbname=openhours',\n    'username' =\u003e 'root',\n    'password' =\u003e '1234',\n    'charset' =\u003e 'utf8',\n];\n```\n\n**NOTES:**\n- Yii won't create the database for you, this has to be done manually before you can access it.\n- Refer to the README in the `tests` directory for information specific to basic application tests.\n\n\nTESTING\n-------\n\nTests are located in `tests` directory. They are developed with [Codeception PHP Testing Framework](http://codeception.com/).\n\nCurrently 2 API tests for `is-open-at` and `next-state-chage` endpoints are implemented:\n\n- https://github.com/mmirzaee/opening-hours/blob/master/tests/api/IsOpenAtCest.php\n- https://github.com/mmirzaee/opening-hours/blob/master/tests/api/NextStateChangeCest.php\n\nAbove tests include different scenarios of precedence and overlapping. Tests can be executed by running:\n\n```\nvendor/bin/codecept run\n```\n\nBoth should pass:\n\n\u003cimg src=\"tests.png\" width=\"480\" alt=\"Passing API tests\" /\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmirzaee%2Fopening-hours","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmirzaee%2Fopening-hours","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmirzaee%2Fopening-hours/lists"}