diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a0ffa0d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,45 @@ +## 1.1.0 + +* Add bypass-proxy-for option added in 0.12.3 (see [#302](https://github.com/KnpLabs/snappy/pull/302)) +* Fix symfony/process 4.2 deprecation notice (see [#331](https://github.com/KnpLabs/snappy/pull/331)) +* Drop suppor for unmaintained PHP versions (5.6 and 7.0, see [#337](https://github.com/KnpLabs/snappy/pull/337) +* Drop support for unmaintained symfony/process versions (see [#337](https://github.com/KnpLabs/snappy/pull/337)) +* Pass on error code in checkProcessStatus (see [#328](https://github.com/KnpLabs/snappy/pull/328)) + +Thanks to @joshpme, @drigani, @fbourigault, @NiR- and @leimd for their work. + +## 1.0.4 + +* Support cache-dir for Image generation (see [#297](https://github.com/KnpLabs/snappy/pull/297)). + +Thank you @dimitrilahaye for their work. + +## 1.0.3 + +* Add support to Symfony 4 ([#290](https://github.com/KnpLabs/snappy/pull/290)) +* Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase ([#287](https://github.com/KnpLabs/snappy/pull/287)) + +Credits go to @michaelperrin and @carusogabriel. + +## 1.0.2 + +*A BC break was introduced in v1.0.0: using objects castable to string with a cyclic dependency to the generator +as option value would break `setOption()` / `setOptions()` methods.* + +* Use logger context rather than `var_export` to log option values (see [#283](https://github.com/KnpLabs/snappy/pull/283)) + +Credits go to: @barryvdh. + +## 1.0.1 + +* Fix `Call to a member function debug() on null` logger (see [#270](https://github.com/KnpLabs/snappy/pull/270)) + +## 1.0.0 + +* Don't check if it's a file when the path is bigger than `PHP_MAXPATHLEN` (see [#224](https://github.com/KnpLabs/snappy/pull/224)) +* Pass `image-dpi` and `image-quality` options as integer (see [#251](https://github.com/KnpLabs/snappy/pull/251)) +* Improve documentation readability (see [#255](https://github.com/KnpLabs/snappy/pull/255)) +* Add logging capabilities to generators (see [#264](https://github.com/KnpLabs/snappy/pull/264)) +* Add some more frequent questions/issues to the FAQ (see [#263](https://github.com/KnpLabs/snappy/pull/263), [#265](https://github.com/KnpLabs/snappy/pull/265), [#266](https://github.com/KnpLabs/snappy/pull/266)) + +Credits go to: @wouterbulten, @martinssipenko, @Herz3h, @akovalyov, @NiR-. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..45ac77b --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,64 @@ + +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +Examples of representing a project or community include using an official +project e-mail address, posting via an official social media account, or acting +as an appointed representative at an online or offline event. Representation of +a project may be further defined and clarified by project maintainers. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +## Contact +If you have any questions or feedback, [please ping us](https://twitter.com/KNPLabs) ! diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..472c051 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,85 @@ + +# Thanks for contributing! + +:+1: First of all, thanks for contributing! The team is happy to help if you +have any questions. Have a look to this contributing guide and also to the +[FAQ section](https://github.com/KnpLabs/snappy/blob/master/doc/faq.md). :feet: +The following is a set of guidelines for contributing to Snappy, which is hosted +by the [KNP Labs Organization](https://github.com/KnpLabs) on GitHub. These are +mostly guidelines, not rules. Use your best judgment, and feel free to propose +changes to this document opening a pull request. :shipit: + +## Code of Conduct + +This project and everyone participating in it is governed by the following +[Code of Conduct](https://github.com/KnpLabs/snappy/blob/master/CODE_OF_CONDUCT.md). +By participating, you are expected to uphold this code. + +## Reporting a bug + +#### Before submitting a bug +- Verify that you are using the latest Snappy version; +- Double-check the [documentation](https://github.com/KnpLabs/snappy/blob/master/README.md) +and the [FAQ section](https://github.com/KnpLabs/snappy/blob/master/doc/faq.md) +to see if you're not misusing the library; +- Check if the issue is a Snappy issue and not a wkhtmltopdf issue (see [how to](#how-to-verify-if-the-issue-is-a-snappy-issue)); +- Check if the issue has already been reported. If it has and the issue is still +open, add a comment to the existing issue instead of opening a new one. + +##### How to verify if the issue is a Snappy issue +In order to verify that the issue is a Snappy issue and not a wkhtmltopdf issue, +simply copy paste the command displayed in the error message in your command prompt. +If the same error appears on the command line, then it's a wkhtmltopdf issue and +you'll have more chance to resolve your issue [there](https://github.com/wkhtmltopdf/wkhtmltopdf/issues). + +#### How to submit a (good) bug report +To report a Snappy bug please open a [GitHub issue](https://github.com/KnpLabs/snappy/issues) +following the rules below. + +- Use a clear and descriptive title for the issue to identify the problem; +- Describe the steps needed to reproduce the bug including a code example when +possible; +- Give as much detail as possible about your environment (OS, PHP version, +Snappy configuration, ...); + +## Suggesting enhancements + +To suggest Snappy enhancements please open a [GitHub issue](https://github.com/KnpLabs/snappy/issues) +following the rules below. + +- Use a clear and descriptive title for the issue to identify the problem; +- Provide a step-by-step description of the suggested enhancement in as many +details as possible; +- Explain why this enhancement would be useful with one or more use cases; + +## Contributing to the code + +A pull request, is the best way to provide a bug fix or to propose enhancements to Snappy. + +When submitting a pull request please be sure to follow the same rules described +above in [Reporting a bug](#reporting-a-bug) and [Suggesting enhancements](suggesting-enhancements) +sections depending on the nature of your change. + +> Before starting to work on a large change please open an issue to ask the +maintainers if they are fine with it (no one likes to work for nothing!). + +1. Fork the repository +2. Once the repository has been forked clone it locally +``` +git clone git@github.com:USERNAME/snappy.git +``` +3. Create a new branch +``` +git checkout -b BRANCH_NAME master +``` +4. Code!!! +5. Add/Update tests (if needed) +6. Update documentation (if needed) +7. Run the tests and make sure that they are passing +``` +composer unit-tests +composer static-analysis +``` +8. Squash your commits +9. Rebase your branch on master and fix merge conflicts +10. Open the pull request diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cbdf8a9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2010 Matthieu Bontemps + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..38c951c --- /dev/null +++ b/README.md @@ -0,0 +1,68 @@ +
A PHP library for generating PDF files from HTML
+