From aab7768253af88487dd137ac16153f776b64eee1 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 10 Jul 2016 15:31:09 -0400 Subject: [PATCH] Update PHP documentation (7.0.8) Closes #436. --- lib/docs/filters/php/clean_html.rb | 2 +- lib/docs/filters/php/entries.rb | 4 +++- lib/docs/scrapers/php.rb | 10 +++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/docs/filters/php/clean_html.rb b/lib/docs/filters/php/clean_html.rb index 62ef7b2f..86c8af3d 100644 --- a/lib/docs/filters/php/clean_html.rb +++ b/lib/docs/filters/php/clean_html.rb @@ -23,7 +23,7 @@ module Docs css('.phpcode').each do |node| node.name = 'pre' node.inner_html = node.inner_html.gsub(br, "\n") - node.content = node.content + node.content = node.content.strip node['data-language'] = 'php' end diff --git a/lib/docs/filters/php/entries.rb b/lib/docs/filters/php/entries.rb index c74b8459..b3ab5f0e 100644 --- a/lib/docs/filters/php/entries.rb +++ b/lib/docs/filters/php/entries.rb @@ -20,6 +20,7 @@ module Docs 'SplTempFile' => 'SPL/File', 'Spl' => 'SPL', 'Stackable' => 'pthreads', + 'Sync' => 'Sync', 'streamWrapper' => 'Stream', 'Thread' => 'pthreads', 'tidy' => 'Tidy', @@ -79,7 +80,7 @@ module Docs 'Mail' => ['Mail', 'Mailparse'], 'Mathematics' => ['BC Math', 'Math', 'Statistic'], 'Networking' => ['GeoIP', 'Network', 'Output Control', 'SSH2', 'Socket', 'URL'], - 'Process Control' => ['Eio', 'Libevent', 'POSIX', 'Program execution', 'pthreads'], + 'Process Control' => ['Eio', 'Libevent', 'POSIX', 'Program execution', 'pthreads', 'PCNTL', 'Ev', 'Semaphore', 'Shared Memory', 'Sync'], 'String' => ['Ctype', 'PCRE', 'POSIX Regex', 'Taint'], 'Variables' => ['Filter', 'Variable handling'], 'XML' => ['libxml', 'SimpleXML', 'XML Parser', 'XML-RPC', 'XMLReader', 'XMLWriter', 'XSLT'] } @@ -99,6 +100,7 @@ module Docs type = at_css('.up').content.strip type = 'SPL/Iterators' if type.end_with? 'Iterator' + type = 'Ev' if type =~ /\AEv[A-Z]/ type.remove! ' Functions' TYPE_BY_NAME_STARTS_WITH.each_pair do |key, value| diff --git a/lib/docs/scrapers/php.rb b/lib/docs/scrapers/php.rb index ed8ec6e3..0dbd32c6 100644 --- a/lib/docs/scrapers/php.rb +++ b/lib/docs/scrapers/php.rb @@ -4,7 +4,7 @@ module Docs self.name = 'PHP' self.type = 'php' - self.release = 'up to 7.0.7' + self.release = 'up to 7.0.8' self.base_url = 'https://secure.php.net/manual/en/' self.root_path = 'index.html' self.initial_paths = %w( @@ -44,13 +44,13 @@ module Docs /\Areserved\.variables/] BOOKS = %w(apache apc array bc bzip2 calendar csprng classobj ctype curl - datetime dba dir dom eio errorfunc event exec fileinfo filesystem filter + datetime dba dir dom eio errorfunc ev event exec fileinfo filesystem filter ftp funchand gearman geoip gettext gmagick gmp hash iconv iisfunc image imagick imap info inotify intl json ldap libevent libxml mail mailparse math mbstring mcrypt memcached misc mysqli network oauth openssl - outcontrol password pcre pdo pgsql posix pthreads regex runkit reflection - sca session session-pgsql simplexml soap sockets solr sphinx spl - spl-types sqlite3 sqlsrv ssh2 stats stream strings taint tidy uodbc url + outcontrol password pcntl pcre pdo pgsql posix pthreads regex runkit reflection + sca session sem session-pgsql shmop simplexml soap sockets solr sphinx spl + spl-types sqlite3 sqlsrv ssh2 stats stream strings sync taint tidy uodbc url var varnish xml xmlreader xmlrpc xmlwriter xsl yaf yar yaml zip zlib) options[:only] = BOOKS.map { |s| "book.#{s}.html" }