Skip to content

Enhance Yaml Component readme #17981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions src/Symfony/Component/Yaml/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
Yaml Component
==============

YAML implements most of the YAML 1.2 specification.
[![Package version](https://img.shields.io/packagist/v/symfony/yaml.svg)](https://packagist.org/packages/symfony/yaml)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed, we are not using any badges on symfony/symfony.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it's a policy on the repo I guess there is not much that can be done here. Still, do you have a means to display the latest composer version available automatically without the badge? Otherwise would a link to packagist be acceptable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, you generally don't need to know it as composer require symfony/yaml will guess a constraint based on the available versions


```php
use Symfony\Component\Yaml\Yaml;
The Yaml Component implements most of the
[YAML 1.2 specification](http://yaml.org/spec/1.2/spec.html).

$array = Yaml::parse(file_get_contents(filename));
[See the Documentation](http://symfony.com/doc/current/components/yaml).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabpot @javiereguiluz should we use https links for the symfony.com website ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So:

  1. I need to fix the link
  2. Wouldn't be possible to get an auto-redirection to HTTPS?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theofidry symfony.com does not yet enforce HTTPS. but it is best to start using it, as it is available since a few months


print Yaml::dump($array);
Contributing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep such a section, but instead, its content should tell people to use the main repository when contributing (making it less likely to have to move PRs to the main repo, which breaks the development experience as people cannot modify the moved PR after that as it is owned by a core dev)

------------

Read the [Symfony Contribution Guide](http://symfony.com/doc/current/contributing/index.html)
for all informations relative on how to contribute, the conventions and so on.

To run the unit tests with the following command:

```bash
$ cd path/to/src/Symfony/Component/Yaml/
$ composer install
$ phpunit
```

Resources
Changelog
---------

You can run the unit tests with the following command:
Full changelog available [here](CHANGELOG.md).

License
-------

$ cd path/to/Symfony/Component/Yaml/
$ composer install
$ phpunit
This project is under the [MIT License](LICENSE).