{"id":1477,"date":"2019-01-09T09:58:42","date_gmt":"2019-01-09T08:58:42","guid":{"rendered":"https:\/\/www.smsapi.com\/blog\/?p=1477"},"modified":"2023-02-05T21:18:46","modified_gmt":"2023-02-05T20:18:46","slug":"smsapi-php-client-new-version-released","status":"publish","type":"post","link":"https:\/\/www.smsapi.com\/blog\/smsapi-php-client-new-version-released\/","title":{"rendered":"SMSAPI PHP client new version released"},"content":{"rendered":"\n<p><strong>SMSAPI PHP client has been on market for 6 years. Ever since it has been downloaded at least <a href=\"https:\/\/packagist.org\/packages\/smsapi\/php-client\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">130.000 times according to Packagist statistics<\/a>.&nbsp;That&#8217;s a great success for us and encouragement that keeps us focused on our library quality every day.&nbsp;We would like to announce that a brand new version of SMSAPI PHP client 2.0 has been released.<\/strong><span style=\"font-weight: 400;\"><br><\/span><\/p>\n\n\n\n<!--more-->\n\n\n\n<p><span style=\"font-weight: 400;\">Our main goal was to make the use of SMS API features more convenient for end users and more object oriented for programmers who would like to extend the library on their own.<\/span> Read more about how to send SMS with PHP!<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-smsapi-blog wp-block-embed-smsapi-blog\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"I7Edzx39HE\"><a href=\"https:\/\/www.smsapi.com\/blog\/send-sms-with-php-library\/\">Send SMS with PHP (Library, code examples, open SMS API)<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Send SMS with PHP (Library, code examples, open SMS API)&#8221; &#8212; SMSAPI Blog\" src=\"https:\/\/www.smsapi.com\/blog\/send-sms-with-php-library\/embed\/#?secret=jM89Nc1tLF#?secret=I7Edzx39HE\" data-secret=\"I7Edzx39HE\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">What&#8217;s new?<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">PHP 7<\/h4>\n\n\n\n<p><span style=\"font-weight: 400;\">Based on PHP version market share, we decided to go with the flow and to rewrite the client using PHP 7.0. Popularity of PHP 7 is constantly growing each day and <a href=\"http:\/\/php.net\/supported-versions.php\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">support for PHP 5 has dropped<\/a>. However, don&#8217;t worry if you are not ready yet for the change &#8211; you will still be able to use the library v1 branch.<br><\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Features<\/h4>\n\n\n\n<p><span style=\"font-weight: 400;\">The library has been enriched with some new features: ping, short URL and contacts. You can now use our ping endpoint to check our platform status. You can now also easily access our short URL basic services. Contacts support has been extended. You can pin\/unpin contacts, manage contact groups and search for group permissions.<\/span><span style=\"font-weight: 400;\"><br><\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Proxy servers<\/h4>\n\n\n\n<p><span style=\"font-weight: 400;\">Connecting via proxy servers to SMSAPI is now supported.<\/span><span style=\"font-weight: 400;\"><br><\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Logging<\/h4>\n\n\n\n<p><span style=\"font-weight: 400;\">We added psr\/log support. The psr\/log is nowadays the standard for modern PHP projects. You can configure how to proccess SMSAPI client logs with ease.<\/span><span style=\"font-weight: 400;\"><br><\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What has changed?<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Superseded endpoints<\/h4>\n\n\n\n<p><span style=\"font-weight: 400;\">We constantly work hard to make our API more user friendly. Over a few years RESTfull APIs have become a standard. Continuously we are improving <a href=\"https:\/\/www.smsapi.com\/en\/sms-api\" target=\"_blank\" rel=\"noreferrer noopener\">SMS API<\/a> enpoints to supersede some old-fashioned endpoints with new ones. The client is now supporting the profile and subusers endpoints over user.do service and SMS\/sendernames over sender.do service. That change should be transparent to the library users.<br><\/span><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Superseded transport layer<\/h4>\n\n\n\n<p><span style=\"font-weight: 400;\">We decided to make use of Guzzle library as HTTP transport layer for our library. That makes our client more object oriented and testable than ever.<\/span><span style=\"font-weight: 400;\"><br><\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What has been removed?<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Basic authorization<\/h4>\n\n\n\n<p><span style=\"font-weight: 400;\">Basic authorization has been removed entirely. You should start using token authorization instead.<\/span><span style=\"font-weight: 400;\"><br><\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to switch to v2?<\/h3>\n\n\n\n<p>We encourage you to use the Composer, a dependency manager for PHP, to install our new client library. If you are already using Composer as dependency manager just change smsapi\/php-client version constraint to &#8216;^2&#8217; and run composer update. To start using SMSAPI PHP client within a new project simply run &#8216;composer require smsapi\/php-client&#8217;.<\/p>\n\n\n\n<p>Not using the Composer? Visit our <a rel=\"noreferrer noopener nofollow\" href=\"https:\/\/github.com\/smsapi\/smsapi-php-client\" target=\"_blank\">SMSAPI client repository GitHub page<\/a>\u00a0and download an archive.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SMSAPI PHP client has been on market for 6 years. Ever since it has been downloaded at least 130.000 times according to Packagist statistics.&nbsp;That&#8217;s a great success for us and encouragement that keeps us focused on our library quality every day.&nbsp;We would like to announce that a brand new version of SMSAPI PHP client 2.0 [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":1479,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[20],"class_list":["post-1477","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","tag-english"],"_links":{"self":[{"href":"https:\/\/www.smsapi.com\/blog\/wp-json\/wp\/v2\/posts\/1477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.smsapi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.smsapi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.smsapi.com\/blog\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smsapi.com\/blog\/wp-json\/wp\/v2\/comments?post=1477"}],"version-history":[{"count":8,"href":"https:\/\/www.smsapi.com\/blog\/wp-json\/wp\/v2\/posts\/1477\/revisions"}],"predecessor-version":[{"id":5374,"href":"https:\/\/www.smsapi.com\/blog\/wp-json\/wp\/v2\/posts\/1477\/revisions\/5374"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.smsapi.com\/blog\/wp-json\/wp\/v2\/media\/1479"}],"wp:attachment":[{"href":"https:\/\/www.smsapi.com\/blog\/wp-json\/wp\/v2\/media?parent=1477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.smsapi.com\/blog\/wp-json\/wp\/v2\/categories?post=1477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.smsapi.com\/blog\/wp-json\/wp\/v2\/tags?post=1477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}