diff --git a/LICENSE b/LICENSE index 8a433e3..ec1a2ae 100644 --- a/LICENSE +++ b/LICENSE @@ -1,12 +1,21 @@ -ConvertAPI -https://www.convertapi.com -(c) 2011-2024 ConvertApi - -ConvertAPI.PHP -https://github.com/ConvertAPI/convertapi-php -Copyright (c) 2024 ConvertApi - -The MIT License -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. +MIT License + +Copyright (c) 2012-2026 ConvertAPI + +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. diff --git a/README.md b/README.md index 0dea859..8346294 100644 --- a/README.md +++ b/README.md @@ -44,18 +44,18 @@ If you use Composer, these dependencies should be handled automatically. If you ### Configuration -You can get your API credentials at https://www.convertapi.com/a +You can get your API token at https://www.convertapi.com/a/authentication ```php use \ConvertApi\ConvertApi; -ConvertApi::setApiCredentials('your-api-secret-or-token'); +ConvertApi::setApiCredentials('api-token'); ``` ### File conversion Convert file to PDF example. All supported formats and options can be found -[here](https://www.convertapi.com/conversions). +[here](https://www.convertapi.com/api). ```php $result = ConvertApi::convert('pdf', ['File' => '/path/to/my_file.docx']); @@ -96,7 +96,7 @@ $result = ConvertApi::convert( #### Additional conversion parameters ConvertAPI accepts additional conversion parameters depending on selected formats. All conversion -parameters and explanations can be found [here](https://www.convertapi.com/conversions). +parameters and explanations can be found [here](https://www.convertapi.com/api). ```php $result = ConvertApi::convert( @@ -104,14 +104,14 @@ $result = ConvertApi::convert( [ 'File' => '/path/to/my_file.docx', 'PageRange' => '1-10', - 'PdfResolution' => '150', + 'Pdfa' => true, ] ); ``` ### User information -You can always check your usage by fetching [user information](https://www.convertapi.com/doc/user). +You can always check your usage by fetching [user information](https://www.convertapi.com/docs/user-information). ```php $info = ConvertApi::getUser(); @@ -121,7 +121,7 @@ echo $info['ConversionsConsumed']; ### Alternative domain -Use `setApiBase` method to set alternative service domain. Dedicated to the region [domain list](https://www.convertapi.com/doc/servers-location). +Use `setApiBase` method to set alternative service domain. Dedicated to the region [domain list](https://www.convertapi.com/docs/servers-location). ```php ConvertApi::setApiBase('https://eu-v2.convertapi.com/'); @@ -146,12 +146,12 @@ Find more advanced examples in the [examples/](https://github.com/ConvertAPI/con Testing is done with PHPUnit: ```sh -CONVERT_API_SECRET=your-api-secret ./bin/phpunit +CONVERT_API_SECRET=your-api-token ./bin/phpunit ``` ## Contributing -Bug reports and pull requests are welcome on GitHub at https://github.com/ConvertAPI/convertapi-library-php. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. +Bug reports and pull requests are welcome on GitHub at https://github.com/ConvertAPI/convertapi-library-php. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://www.contributor-covenant.org) code of conduct. ## License diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..2639538 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security policy + +## Reporting a vulnerability + +Please do not report security vulnerabilities in public GitHub issues, discussions or pull requests. + +Report them privately on GitHub instead: open the [Security tab](https://github.com/ConvertAPI/convertapi-library-php/security) of this repository and click "Report a vulnerability", or go straight to [the report form](https://github.com/ConvertAPI/convertapi-library-php/security/advisories/new). Only you and the maintainers can see the report. + +Please include: + +- the version of the convertapi/convertapi-php Composer package and of PHP you use; +- the steps to reproduce the issue, or a proof of concept; +- what an attacker could do with it. + +We will confirm that we received your report and keep you updated until it is fixed. Please give us reasonable time to release a fix before you disclose the issue publicly. + +You can use the same private route if you are not sure whether the issue is in this SDK or in the ConvertAPI service itself. + +## Supported versions + +Security fixes are released in the latest version of the [convertapi/convertapi-php package on Packagist](https://packagist.org/packages/convertapi/convertapi-php). Please check that the issue still occurs with the latest version before you report it.