PHPackages                             forikal-uk/xml-authoring-project - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. forikal-uk/xml-authoring-project

Abandoned → [https://github.com/xmlsquad/xml-authoring-project](/?search=https%3A%2F%2Fgithub.com%2Fxmlsquad%2Fxml-authoring-project)Project[File &amp; Storage](/categories/file-storage)

forikal-uk/xml-authoring-project
================================

Structured directory where xmls get created, read, updaated or deleted.

v0.3.3(7y ago)151[3 issues](https://github.com/forikal-uk/xml-authoring-project/issues)Apache-2.0

Since May 27Pushed 6y agoCompare

[ Source](https://github.com/forikal-uk/xml-authoring-project)[ Packagist](https://packagist.org/packages/forikal-uk/xml-authoring-project)[ RSS](/packages/forikal-uk-xml-authoring-project/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (7)Versions (11)Used By (0)

xml-authoring-project
=====================

[](#xml-authoring-project)

A structured directory where we build and store xmls.

This acts as a project template which forms the base for creating an xml-authoring-directory for a particular client.

Prerequisites
-------------

[](#prerequisites)

- Git
- PHP
- [Composer installed](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) globally

Work with commands
------------------

[](#work-with-commands)

### Create your composer.json file

[](#create-your-composerjson-file)

This project comes with a default set of dependencies in `composer.json.dist` in the root of the project folder.

Make a copy of that composer.json.dist file for the next step.

```
$ cp composer.json.dist composer.json
```

### Install dependencies

[](#install-dependencies)

For users:

```
$ composer install
```

Developers may wish to use [`--prefer-source`](https://getcomposer.org/doc/03-cli.md#install) to work on git repositories of dependent components):

```
$ composer install --prefer-source
```

- Try example `hello-world` command from `xml-authoring-tools`:

    ```
    # Stream some example content into the config file (creating it if it does not exist)
    $ pwd
    /Users/x/Documents/Projects/XmlAuthoringSuite/xml-authoring-project
    $ cat vendor/xmlsquad/xmlauthor-example-command/XmlAuthoringProjectSettings.yaml.dist >> XmlAuthoringProjectSettings.yaml

    # Try
    bin/console hello-world
    ```
- (optional) Require additional command packages:

    ```
    composer require xmlsquad/some-package
    ```

    To study/try commands from required packages - see package's `README.md`.

Who needs this anyway?
----------------------

[](#who-needs-this-anyway)

So, you are a staff member who is responsible for creating and editing a client's Xml files.

We have a client who wants some Xmls authored. We need to set up a folder on your computer that acts as a 'working directory' for the client's Xml project.

We use Git SCM to track changes to the files within this directory.

Each instance of this [xml-authoring-project](https://github.com/xmlsquad/xml-authoring-project) has a `composer.json` file in the root directory which specifies an ever-increasing set of custom software tools that can speed up your most repetitive tasks.

### Custom software tools

[](#custom-software-tools)

[These tools](https://github.com/xmlsquad/xml-authoring-tools) have been built to work in the context of this xml-authoring-project.

We will use software tools to:

- to manipulate and query the Xmls files that are stored within this directory;
- when run inside [Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines), to test and report on the state of the Xml files whenever changes are committed.

We also use custom tools (along with the project's configuration settings) to convert the client's Google Sheets into snippets of Xml that are stored here.

Getting started
===============

[](#getting-started)

We assume that you have installed :

- [Git SCM](https://git-scm.com/)
    - (with [Git LFS](https://www.atlassian.com/git/tutorials/git-lfs) enabled)
- [Composer](https://getcomposer.org/doc/00-intro.md) (installed globally)

Navigate to your `Projects` directory
-------------------------------------

[](#navigate-to-your-projects-directory)

- On your workstation, open MacOs Terminal or Windows Git Bash
- Navigate to the folder on your computer where you keep Xml authoring projects.

```
$ cd /Users/Bob/Documents/Projects/XmlAuthoring

```

Given a client, we may or may not already have their working directory set up as a git repository in the cloud.

### Using an existing working directory.

[](#using-an-existing-working-directory)

- Determine the location of the "origin" Git repository for that client's working directory (ask the account manager).
- Run `git clone` to get a local copy of the client's working directory
- Use `cd` to change into the working directory.

Now, you should be able to work on the Xml files.

Once your edits are finished, use `git` to [commit your changes](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) to the `origin`.

### Set up a new xml authoring project working directory for a client

[](#set-up-a-new-xml-authoring-project-working-directory-for-a-client)

We create a new git repository (based on this [xml-authoring-project](https://github.com/xmlsquad/xml-authoring-project)), alter the remotes then push it to our git hosting solution. Effectively, we [fork it](https://help.github.com/articles/fork-a-repo/).

- Ensure the client has an empty "origin" Git repository created for them (ask the client's account manager).
- Run `git clone` to get a local copy of
- Use `cd` to change into the working directory.
- Use `git remote set-url` command set the `origin` to the client's repository. ie.

```
$ git remote set-url origin git@github.com:path/to/git/repo.git

```

Query the setting to ensure it worked:

```
$ git remote -v
origin	git@github.com:path/to/git/repo.git (fetch)
origin	git@github.com:path/to/git/repo.git (push)

```

- `git push` to push the base project up to the client's `origin` repository.

Ensure the tools are installed
------------------------------

[](#ensure-the-tools-are-installed)

- Run `composer install` to ensure that all the tools are installed.

Now, you should be able to work on the Xml files.

Once your edits are finished, use `git` to commit your changes to the `origin`.

Configure the tools
-------------------

[](#configure-the-tools)

As the end user, you will need to add some configuration files to the root of the project:

### Connecting to GSuite

[](#connecting-to-gsuite)

NOTE: At the time of writing we have [2 sub-projects that are connecting to GSuite](https://github.com/xmlsquad?tab=repositories). Each project's developer has been given freedom to solve the issue of Google API authentication as they need. In the next few hours, I will look at all solutions and pick one to be the definitive method.

In the mean time, you could copy the pattern used by another devloper to determine where your credential files will be stored.

Check the project's dev branches and pull requests. The one's that connect to GSuite are:

- [gsheet-to-xml](https://github.com/xmlsquad/gsheet-to-xml) - Given the url of a Google Sheet, this Symfony Console command fetches the Google Sheet and outputs it in the form of Xml.
- [ping-drive](https://github.com/xmlsquad/ping-drive) - Symfony Console command that reports its attempts at locating and reading the contents of a Google Drive folder or file.

A third sub project is being built called:

- [capture-lookups](https://github.com/xmlsquad/capture-lookups) - A Symfony 3.4 Console command. When given configuration file listing URLs of Google Sheets, grabs them and stores them locally as CSV files.

We have a library for shared code at:

- [xml-authoring-library](https://github.com/xmlsquad/xml-authoring-library)

### XmlAuthoringProjectSettings.yaml

[](#xmlauthoringprojectsettingsyaml)

One instance of an xml-authoring-project is created for each of our company's clients. This configuration file is used to store client-wide configurations like the location of the client's key files and folders on GSuite.

Using the tools
===============

[](#using-the-tools)

See:

Keeping the tools updated
=========================

[](#keeping-the-tools-updated)

The custom tools are always improving.

To update to the latest versions of the tools.

- First ensure all changes to client files are committed and pushed to the repository
- In the command terminal, navigate to the root of the client working directory and run `composer update`

Known bugs
----------

[](#known-bugs)

We use OAuth authentication for the `bin/console inventory:gsheet-to-xml` command to access a Google Sheet.

However, when you first run the command, it asks for an Auth code, but does not give any advice on how to get your Auth code.

The workaround is to run a different command, ping-drive, to 'get logged in' and save your authentication token. Once, done, gsheet-to-xml will use that same token to access the Google Sheet.

### Example

[](#example)

Assuming you have a Google OAuth Key and `XmlAuthoringProjectSettings.yaml` defines the OAuth Key (`gApiOAuthSecretFile`) location and the name of the token file (`gApiAccessTokenFile`).

Ensure you have navigated to the project folder:

```
$ pwd
/Users/x/Documents/Projects/XmlAuthoringSuite/xml-authoring-project

```

Run `ping-drive`:

```
$ bin/console ping-drive  https://drive.google.com/drive/folders/
You need to authenticate to your Google account to proceed
Open the following URL in a browser, get an auth code and paste it below:

Auth code:

```

Now you can run the `inventory:gsheet-to-xml` using the token.

Development Notes
-----------------

[](#development-notes)

### Composer validation notice is OK

[](#composer-validation-notice-is-ok)

Before 2019-11-03, the team [used a trick](https://github.com/xmlsquad/xml-authoring-project/issues/2#issuecomment-394185484) to check dependencies. This trick leaves a validation warning when the project's `composer.json` file is checked by `composer validate`.

```
$ pwd
/Users/x/Documents/Projects/XmlAuthoring/xml-authoring-project
$ composer validate
./composer.json is valid for simple usage with composer but has
strict errors that make it unable to be published as a package:
See https://getcomposer.org/doc/04-schema.md for details on the schema
The property repositories-local is not defined and the definition does not allow additional properties
```

So, although it might look painful. It is harmless. So, we ignore it. We will remove it once the project is more settled.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~18 days

Recently: every ~29 days

Total

9

Last Release

2763d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b3f30d378f09a6e60c2bc0344743b0a0ac47a039940ca322042d94f11016c306?d=identicon)[forikal-uk](/maintainers/forikal-uk)

---

Top Contributors

[![john-arcus](https://avatars.githubusercontent.com/u/32770045?v=4)](https://github.com/john-arcus "john-arcus (54 commits)")[![forikal-uk](https://avatars.githubusercontent.com/u/39656410?v=4)](https://github.com/forikal-uk "forikal-uk (16 commits)")[![igormukhingmailcom](https://avatars.githubusercontent.com/u/6544038?v=4)](https://github.com/igormukhingmailcom "igormukhingmailcom (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/forikal-uk-xml-authoring-project/health.svg)

```
[![Health](https://phpackages.com/badges/forikal-uk-xml-authoring-project/health.svg)](https://phpackages.com/packages/forikal-uk-xml-authoring-project)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M124](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
