{"id":18410009,"url":"https://github.com/snowdogapps/php-recruitment-test","last_synced_at":"2025-04-07T09:34:28.614Z","repository":{"id":46053331,"uuid":"64653987","full_name":"SnowdogApps/php-recruitment-test","owner":"SnowdogApps","description":"This repository contains recruitment test for PHP developers.","archived":false,"fork":false,"pushed_at":"2021-11-17T13:27:22.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-03T20:02:50.919Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SnowdogApps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-01T09:26:38.000Z","updated_at":"2022-07-22T05:30:08.000Z","dependencies_parsed_at":"2022-09-18T12:30:15.638Z","dependency_job_id":null,"html_url":"https://github.com/SnowdogApps/php-recruitment-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SnowdogApps%2Fphp-recruitment-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SnowdogApps%2Fphp-recruitment-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SnowdogApps%2Fphp-recruitment-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SnowdogApps%2Fphp-recruitment-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SnowdogApps","download_url":"https://codeload.github.com/SnowdogApps/php-recruitment-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223277093,"owners_count":17118476,"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-06T03:28:32.261Z","updated_at":"2024-11-06T03:28:33.507Z","avatar_url":"https://github.com/SnowdogApps.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snowdog PHP Recruitment test\n\nTest scenario is cache warming application.\nWhen website uses full page caching (like Varnish Cache) there may be requirement to periodically warm cache contents.\nThis consists of purging cache contents for given address and visiting given address.\nFollowing application allows for multiple users to define multiple websites and for those websites define multiple URLs to visit.\n\nApplication uses:\n* [composer](http://getcomposer.org)\n* [PDO](http://php.net/manual/en/book.pdo.php) for MySql access\n* [Silly](https://github.com/mnapoli/silly) for CLI commands\n* [FastRoute](https://github.com/nikic/FastRoute) for routing\n* [PHP-DI](http://php-di.org/) as dependency injection container\n\nFollowing diagram shows basic database scheme\n![Database Scheme](doc/db.png)\n\n\n## Task 1\n\nFork this git repository.\n_Make sure to commit Your work after every completed task._\n\u003e Hint: make sure Your solutions are private, do NOT make pull requests against this repository to submit Your solutions\n\nInstall and configure application by running following command\n`php console.php migrate_db`\n\nYou can run PHP build-in server by running following command\n`php -S 0.0.0.0:8000 -t web/`\n\nThe web application is running at http://localhost:8000.\n\nNow create `.gitignore` file appropriate for Your development environment.\n\n## Task 2\n\nAs You may have noticed console command `php console.php warm 3` is failing because it cannot access legacy library located in `lib` directory.\nFix this problem.\n\n## Task 3\n\nModify application so that we can see and track time of last page visit.\nThis will require database modification, changes to cache warming process and changes to pages views.\n\u003e Hint: for introducing database changes see `\\Snowdog\\DevTest\\Command\\MigrateCommand`\n\n## Task 4\n\nOn homepage for logged in users add following information:\n* Total number of pages associated with this user\n* Least recently visited page\n* Most recently visited page\n\n## Task 5\n\nAllow users to define multiple caching servers.\nEach caching server has it's own unique IP address and can cache multiple websites.\nYou can assume that different users do not share caching servers.\nThis will require database modification, changes to cache warming process and changes on frontend.\nUse partial solution available in branch `task/five`.\nUse AJAX requests for saving caching server - website association.\n\n## Task 6\n\nCreate new empty git repository.\n\nIn newly created repository create new application component (composer dependency) that allows adding new websites and pages by importing [sitemap file](http://www.sitemaps.org/).\nThis functionality should be accessible via both command line and frontend.\n\n## Task 7\n\nAs You may have noticed pages that require logged in user are visible to users, and those that make sense only for not logged in users (like login or registration forms) are visible to logged in users.\nIntroduce modification that will fix this problem (show login form to not logged in users on pages that require user context and show 403 message on login and registration forms when user is logged in).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowdogapps%2Fphp-recruitment-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnowdogapps%2Fphp-recruitment-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowdogapps%2Fphp-recruitment-test/lists"}