{"id":28490387,"url":"https://github.com/makinacorpus/drupal-usync","last_synced_at":"2025-07-30T19:34:00.954Z","repository":{"id":28252249,"uuid":"31760924","full_name":"makinacorpus/drupal-usync","owner":"makinacorpus","description":"Minimal yet powerfull config file based features-like toolkit for Drupal 7.","archived":false,"fork":false,"pushed_at":"2018-04-23T09:13:40.000Z","size":220,"stargazers_count":2,"open_issues_count":4,"forks_count":1,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-06-08T07:08:39.497Z","etag":null,"topics":["drupal","features","yml"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"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/makinacorpus.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":"2015-03-06T09:00:22.000Z","updated_at":"2018-04-23T09:13:30.000Z","dependencies_parsed_at":"2022-09-04T13:10:43.277Z","dependency_job_id":null,"html_url":"https://github.com/makinacorpus/drupal-usync","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/makinacorpus/drupal-usync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makinacorpus%2Fdrupal-usync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makinacorpus%2Fdrupal-usync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makinacorpus%2Fdrupal-usync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makinacorpus%2Fdrupal-usync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makinacorpus","download_url":"https://codeload.github.com/makinacorpus/drupal-usync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makinacorpus%2Fdrupal-usync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267929015,"owners_count":24167433,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"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":["drupal","features","yml"],"created_at":"2025-06-08T07:08:43.377Z","updated_at":"2025-07-30T19:34:00.942Z","avatar_url":"https://github.com/makinacorpus.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# µSync\n\nMinimal yet powerfull config file based features-like toolkit for Drupal 7.\n\n## How does it work\n\nIt works by building a fully featured AST composed of typed nodes representing\nyour configuration file, then browsing the tree and executing code over it.\n\n## Getting started\n\n### Create a sample module\n\nLet's assume you are working on a custom blog module:\n\n    sites/all/modules/myblog/\n        myblog.module\n        myblog.info\n        myblog.yml\n\nContents of the myblog.info file:\n\n    name = My blog feature\n    description = Very simple blog feature for my site.\n    core = 7.x\n    usync[] = myblog.yml\n\nContents of the myblog.yml file:\n\n    field:\n      blog_image:\n        label: Post photo\n        type: image\n\n    entity:\n      blog_post:\n        blog:\n          name: Blog post\n          field:\n            blog_image: true\n            body: true\n\n    view:\n      node:\n        blog_post:\n\n          default:\n            post_image:\n              type: image\n              settings:\n                image_style: thumbnail\n            body: true\n\n          teaser:\n            blog_image:\n              type: image\n              settings:\n                image_style: thumbnail\n            body:\n              type: text_summary_or_trimmed\n              settings:\n                trim_length: 200\n\n### List available data sources on site\n\n    \u003e drush usync-list\n\n    Module  Source\n    myblog  myblog.yml \n\n### List available data in tree\n\nThere is three alternative syntaxes for this use case.\n\nShow a tree of everything declared by the myblog module:\n\n    \u003e drush usync-tree --source=myblog:\n\nShow a tree of the myblog.yml file declared by the myblog module:\n\n    \u003e drush usync-tree --source=myblog:myblog.yml\n\nShow a tree of the myblog.yml file accessing it directly:\n\n    \u003e drush usync-tree --source=sites/all/modules/myblog/myblog.yml\n\nNote that the --source parameter will be the same for all drush commands of\nthis module, which means you can work directly on files without those needing\nto be defined by a specific module.\n\nOutput for the sample file should be:\n\n     + field.blog_image\n     + field.body\n     + entity.node.post.field.blog_image\n     + entity.node.post.field.body\n     + entity.node.post\n     + view.node.blog_post.default\n     + view.node.post.teaser\n\n### Listing matching elements in tree\n\nLet's use the same source as upper, our 'myblog' module.\n\n    \u003e drush usync-tree --source=myblog: \\\n        --match=entity.node.%\n\n     + entity.node.post\n\nMatching rules are the following:\n\n *  Words will match node names strictly\n\n *  *%* wildcard will match any name\n\n### Injecting configuration into Drupal\n\nNow that you are experienced users of the --source and --match parameters you\ncan proceed to Drupal injection. Just replace the usync-tree command by\nusync-run using the same parameters and it will work.\n\nFor example, inject everything which is in the file:\n\n    \u003e drush usync-tree --source=myblog:\n\nOnce everything is injected, you can proceed to partial updates, for example\nrevert all the view modes:\n\n    \u003e drush usync-tree --source=myblog:\n        --match=view.node.blog_post.%\n\n## FAQ\n\n### But why?\n\nWhy not. Features is slow to revert, features need to be configured via the\nUI, and features are not easy to modify manually, features may bring weird\nconflicts, and features don't know what to do when there is an error and get\nbroken. You can't define things easily, you can make objects inherit from\neach other one, and features uses CTools, supports Views, and push forward\nvery bad practices. Drupal Way is unperformant, unperforming, and I needed\nsomething to write things faster and make things run faster.\n\n### But why Yaml?\n\nWhy not, and you can use plain old PHP arrays instead if you don't like it.\nIt will work like a charm.\n\n### Why should I use it?\n\nI'm not your mamma, if you like to click, use features. Choice is yours. Oh\nand it's an experimental, unfinshed product, so I would be you, I wouldn't\nuse it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakinacorpus%2Fdrupal-usync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakinacorpus%2Fdrupal-usync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakinacorpus%2Fdrupal-usync/lists"}