{"id":15569380,"url":"https://github.com/dwolfhub/xylophone","last_synced_at":"2026-04-16T09:31:17.462Z","repository":{"id":71042420,"uuid":"76128547","full_name":"dwolfhub/xylophone","owner":"dwolfhub","description":"A Silex skeleton project","archived":false,"fork":false,"pushed_at":"2016-12-10T17:56:55.000Z","size":174,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-19T06:44:09.078Z","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/dwolfhub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2016-12-10T17:55:52.000Z","updated_at":"2016-12-10T17:56:56.000Z","dependencies_parsed_at":"2023-06-07T04:15:40.168Z","dependency_job_id":null,"html_url":"https://github.com/dwolfhub/xylophone","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/dwolfhub%2Fxylophone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fxylophone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fxylophone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fxylophone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwolfhub","download_url":"https://codeload.github.com/dwolfhub/xylophone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243223898,"owners_count":20256601,"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-10-02T17:27:30.904Z","updated_at":"2025-12-24T09:52:33.797Z","avatar_url":"https://github.com/dwolfhub.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xylophone \nA Silex skeleton project.\n\n## Up and Running\n\n```\nvagrant up\nvagrant ssh\ncd /var/www\nnvm install v6.9.1\nnpm run watch\n```\n\nThe site will be available at `http://localhost:8081` from your host machine.\n\n## Configuration\n\nConfig files are located in `config/`. \nThe configuration provider uses the environment to determine which config file to load.\nThe environment is determined using the `APPLICATION_ENV` environment variable, but defaults to `vagrant`.\nFor local development, juse copy the `config/local-sample.yml` file to `config/local.yml` and update values therein.\n\n## Frontend\n\n### npm\n[npm](https://www.npmjs.com/) is the package manager used for installing build tools as well as third-party dependencies. Configuration is located in `package.json`.\n\nRun `npm install` to download required tools and modules.\n\n### JavaScript\n\nJavaScript files are located in `app/assets/js/`. \nThe main entry point for the app is `app/assets/js/main.js`. \nScripts are compiled using webpack with the babel plugin. \nAn example module for your reference is located at `app/assets/js/modules/module.js`.\n\n### SASS\n\n[SASS](http://sass-lang.com/) is used for extending CSS with new features and compiles into CSS. \nThe SASS files are located at `app/assets/scss`, and the main SASS file is `app/assets/scss/main.scss`.\n\n## Console Commands\n\nXylophone uses the [Symfony Console Component](http://symfony.com/doc/current/components/console/introduction.html) to perform tasks.\nRun `app/zylophone` to see a list of available commands.\nTo create your own commands, extend the `Knp\\Command\\Command` class.\nAn example command is located at `src/Command/NamespaceCommand.php`.\n\n\n## Database\n\n### Migrations\n\nMigrations are stored in the `src/Resource/Migration` folder. Run `./app/xylophone` in the app root folder to view migration commands:\n\n```Text\nmigrations\n  migrations:diff      Generate a migration by comparing your current database to your mapping information.\n  migrations:execute   Execute a single migration version up or down manually.\n  migrations:generate  Generate a blank migration class.\n  migrations:migrate   Execute a migration to a specified version or the latest available version.\n  migrations:status    View the status of a set of migrations.\n  migrations:version   Manually add and delete migration versions from the version table.\n```\n\n### Query Repositories\n\nThe abstract query repository can be found in `src/QueryRepository/`. Extend it to create your own repositories. Then use them like so:\n\n```php\n$myRepo = new Xylophone\\QueryRepository\\MyQueryRepo($app['db']);\n$results = $myRepo-\u003emyMethod();\n```\n\n## Routes and Controllers\n\nAdd your route definitions to `app/app.php`.\nThere is a home route there for your reference:\n\n```php\n$app-\u003eget('/', 'Xylophone\\Controller\\HomeController::index')\n    -\u003ebind('home');\n```\n\nThis route will direct the uri `/` to the index method of the 'Xylophone\\Controller\\HomeController' class. The bind command will allow you to reference this route in your templates like this: `{{ path('home') }}`.\n\nCheck out the [official docs](http://silex.sensiolabs.org/doc/usage.html#routing) for more info.\n\n### Caching\n\nIf you want to cache a response, simply add the `Cache-Control` header to something like `s-maxage=3600, public`. The standard setup will use the cache folder to store response and serve responses from there without having to bootstrap the app.\n\n## Views\n\n### Twig\n\n[Twig](http://twig.sensiolabs.org/) templates should be placed in `frontend/twig`. Render a template using `$app['twig']-\u003erender('filename.html.twig', ['mykey' =\u003e 'myvalue']);`.\n\n```Text\nGlobal Variables\ndebug         Boolean containing the application debug state\njs_filename   dynamically revisioned name of the compiled JavaScript modules\ncss_filename  dynamically revisioned name of the compiled SASS files\n\n```\n\n## Unit Tests\n\nPut your phpunit tests in the `tests/` folder. Extend the `\\Xylophone\\Test\\AbstractTestCase` class in order to have access to things like the web crawler. Here's an example:\n\n```php\nuse \\Xylophone\\Test\\AbstractTestCase;\n\nclass SomeTest extends AbstractTestCase\n{\n    public function testSomething()\n    {\n        $client = $this-\u003ecreateClient();\n        $crawler = $client-\u003erequest('GET', '/');\n    \n        $this-\u003eassertTrue($client-\u003egetResponse()-\u003eisOk());\n        $this-\u003eassertCount(1, $crawler-\u003efilter('h1:contains(\"Hello World\")'));\n    }\n}\n```\n\nCheck out the [official documentation](http://silex.sensiolabs.org/doc/testing.html) for more info.\n\n## Logging\n\nThe logging service is available by using $app['monolog']. The log files reside in `app/logs/`. Here are some examples:\n\n```php\n$app['monolog']-\u003einfo('script started');\n$app['monolog']-\u003eerror('Failed to call function', ['key', $value]);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolfhub%2Fxylophone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwolfhub%2Fxylophone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolfhub%2Fxylophone/lists"}