Jump to content

block34

Members
  • Posts

    29
  • Joined

  • Last visited

Everything posted by block34

  1. $ php -i | grep xdebug.var xdebug.var_display_max_children => 128 => 128 xdebug.var_display_max_data => 512 => 512 xdebug.var_display_max_depth => 3 => 3 $ export PHP_INI_SCAN_DIR=. $ php -i | grep -F .php.ini Additional .ini files parsed => ./.php.ini $ cat .php.ini xdebug.var_display_max_depth = -1 xdebug.var_display_max_children = -1 xdebug.var_display_max_data = -1 $ php -i | grep xdebug.var || echo NOT FOUND NOT FOUND Why?
  2. Why should require my/a package? I don't want to request/download/install anything. Let's pretend I don't know anything. Let's pretend I only know that the my/b package exists (I don't want to request/download/install). Let's pretend I just want to know which packages use the my/b package. Can it be?
  3. $ COMPOSER_HOME=.composer composer show -t Composer could not find a composer.json file To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section compose
  4. $ cat .composer/config.json { "repositories": { "a": { "type": "path", "url": "repo/a" }, "b": { "type": "path", "url": "repo/b" }, "c": { "type": "path", "url": "repo/c" } } } $ cat repo/a/composer.json { "name": "my/a", "require": { "my/b": "dev-master" } } $ cat repo/b/composer.json { "name": "my/b", "require": { "my/c": "dev-master" } } $ cat repo/c/composer.json { "name": "my/c" } How do you see my/a requires my/b my/b requires my/c But I wanted to know if there is a way to view *quickly* the whole structure of dependences. Above all, I would like to know the *dependents*. I tried like this $ COMPOSER_HOME=.composer composer show -a my/b No composer.json found in the current directory, showing available packages from a, b, c, packagist.org name : my/b descrip. : keywords : versions : dev-master type : library homepage : source : [] dist : [path] repo/b 6de0f9e677dcab7051f94dbbf05893d0165bb826 names : my/b requires my/c dev-master In summary $ COMPOSER_HOME=.composer composer show -a my/b \ | grep my/ No composer.json found in the current directory, showing available packages from a, b, c, packagist.org name : my/b names : my/b my/c dev-master It tell me that my/b requires my/c but it doesn't tell me that my/b is required from my/a (this is the thing that interests me most). For example, if I have to remove a package (obsolete package), how can I verify that it does not have dependents?
  5. https://www.freecodecamp.org/news/content/images/2020/07/generate-changelog-example.png What do those strings mean at the end of each line (68701efb, be6a6d80, c8d985a0, etc)?
  6. function main($dir, $md5ContainerFilename) { $elements = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($dir) ) ; $records = []; foreach ($elements as $element) { if (is_dir($element)){ continue; } if ($md5ContainerFilename == $element) { continue; } $record = md5($element) . ' ' . $element; array_push($records, $record); } $recordsStr = implode(PHP_EOL, $records); file_put_contents($md5ContainerFilename, $recordsStr); } main( '.', 'dir/md5-container' ); $ $ cat dir/md5-container b4d1a9a6ea915fbc185205f2d9b61caf ./dir/file 847971a473761ce82235c3f99d6a483b ./dir/file2 76efa814f29375feaf93f6b08982ae4e ./dir/md5-container 516f8127e52fadca9ede40e54a59f04b ./file 0a9990b3c55615b43bd0b0bbbf43dd06 ./file2 $ grep md5 dir/md5-container 76efa814f29375feaf93f6b08982ae4e ./dir/md5-container
  7. function main($dir, $md5ContainerFilename) { $elements = iterator_to_array( new RecursiveIteratorIterator( new RecursiveDirectoryIterator($dir) ) ); $records = []; foreach ($elements as $element) { if (is_dir($element)){ continue; } $record = md5($element) . ' ' . $element; array_push($records, $record); } $recordsStr = implode(PHP_EOL, $records); file_put_contents($md5ContainerFilename, $recordsStr); } main( '.', 'dir/md5-container' ); $ cat dir/md5-container b4d1a9a6ea915fbc185205f2d9b61caf ./dir/file 847971a473761ce82235c3f99d6a483b ./dir/file2 76efa814f29375feaf93f6b08982ae4e ./dir/md5-container 516f8127e52fadca9ede40e54a59f04b ./file 0a9990b3c55615b43bd0b0bbbf43dd06 ./file2 As you can see, among the various files, there is also the file dir/md5-container This file should be the container, not part of the content. How can I do to exclude it?
  8. + tree src src └── classes.php + cat src/classes.php <?php class Class1 { /** * @uses Class2::method2() */ function method1(){} } class Class2 { function method2(){} } + phpdoc -d src -t /tmp/docs + grep method1 /tmp/docs/classes/Class2.html || echo 'REFERENCE NOT FOUND' REFERENCE NOT FOUND On the page /tmp/docs/classes/Class2.html, there should be no reference (@usesby) to Class1::method1()? So the document https://cutt.ly/jvDMGhh is not telling the truth? Also, this is what the page /tmp/docs/classes/Class2.html looks like if it is opened in a browser https://i.snipboard.io/cl6gSs.jpg As already mentioned, Class1::method1() is not mentioned anywhere
  9. The following links propose two different versions https://docs.phpdoc.org/3.0/guide/references/phpdoc/tags/internal.html https://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.inlineinternal.pkg.html Respectively {@internal} {@internal}} The second link, in particular, mentions Which is the correct one?
  10. /etc? However can you tell me exactly the commands to get the information you ask for?
  11. $ docker inspect wordpress [ { "Id": "sha256:ee2256095234b2ecd8ccdd6cb0a90e401461020ffa707323ae08a78a03a44ba7", "RepoTags": [ "wordpress:latest" ], "RepoDigests": [ "wordpress@sha256:6f609ebf8518069516df36f0ab504735f8e563c1e303c37eba4902e732fcc6c6" ], "Parent": "", "Comment": "", "Created": "2020-07-10T06:33:41.143418206Z", "Container": "a283dc2b546a4a43d0c243023641e5142976b5557a8760174f5c667549dd2966", "ContainerConfig": { "Hostname": "a283dc2b546a", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "80/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c", "PHP_INI_DIR=/usr/local/etc/php", "APACHE_CONFDIR=/etc/apache2", "APACHE_ENVVARS=/etc/apache2/envvars", "PHP_EXTRA_BUILD_DEPS=apache2-dev", "PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2 --disable-cgi", "PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64", "PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64", "PHP_LDFLAGS=-Wl,-O1 -pie", "GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312", "PHP_VERSION=7.4.8", "PHP_URL=https://www.php.net/distributions/php-7.4.8.tar.xz", "PHP_ASC_URL=https://www.php.net/distributions/php-7.4.8.tar.xz.asc", "PHP_SHA256=642843890b732e8af01cb661e823ae01472af1402f211c83009c9b3abd073245", "PHP_MD5=", "WORDPRESS_VERSION=5.4.2", "WORDPRESS_SHA1=e5631f812232fbd45d3431783d3db2e0d5670d2d" ], "Cmd": [ "/bin/sh", "-c", "#(nop) ", "CMD [\"apache2-foreground\"]" ], "ArgsEscaped": true, "Image": "sha256:5ffac81f7fe38c389bae1d7a7aa526bf0720a896d5721e336fde6efb7c01b24f", "Volumes": { "/var/www/html": {} }, "WorkingDir": "/var/www/html", "Entrypoint": [ "docker-entrypoint.sh" ], "OnBuild": null, "Labels": {}, "StopSignal": "SIGWINCH" }, "DockerVersion": "18.09.7", "Author": "", "Config": { "Hostname": "", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "80/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c", "PHP_INI_DIR=/usr/local/etc/php", "APACHE_CONFDIR=/etc/apache2", "APACHE_ENVVARS=/etc/apache2/envvars", "PHP_EXTRA_BUILD_DEPS=apache2-dev", "PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2 --disable-cgi", "PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64", "PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64", "PHP_LDFLAGS=-Wl,-O1 -pie", "GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312", "PHP_VERSION=7.4.8", "PHP_URL=https://www.php.net/distributions/php-7.4.8.tar.xz", "PHP_ASC_URL=https://www.php.net/distributions/php-7.4.8.tar.xz.asc", "PHP_SHA256=642843890b732e8af01cb661e823ae01472af1402f211c83009c9b3abd073245", "PHP_MD5=", "WORDPRESS_VERSION=5.4.2", "WORDPRESS_SHA1=e5631f812232fbd45d3431783d3db2e0d5670d2d" ], "Cmd": [ "apache2-foreground" ], "ArgsEscaped": true, "Image": "sha256:5ffac81f7fe38c389bae1d7a7aa526bf0720a896d5721e336fde6efb7c01b24f", "Volumes": { "/var/www/html": {} }, "WorkingDir": "/var/www/html", "Entrypoint": [ "docker-entrypoint.sh" ], "OnBuild": null, "Labels": null, "StopSignal": "SIGWINCH" }, "Architecture": "amd64", "Os": "linux", "Size": 543432548, "VirtualSize": 543432548, "GraphDriver": { "Data": { "LowerDir": "/var/lib/docker/overlay2/47ef7806a2760ff29b3c8df660c9268e9bac7e1b3bd83dd0b8132600e1301e94/diff:/var/lib/docker/overlay2/6d4a03144408dee2e26ec515465aa2655754d44fa5e93a4e123b2d0009940b4e/diff:/var/lib/docker/overlay2/8ed9a1b6d7ce568684bb4538c82fa01154a16b62e36ea90461e9ad0b7b24e528/diff:/var/lib/docker/overlay2/c864d3d253878ba5a8fc16a4cfbb74df94a51e53748ef95d6dbc0aaa65a137ea/diff:/var/lib/docker/overlay2/47681a0d0c92a25dec7f7be93dbc2569e8e5e8f6cb7a47b248ea06b3a5385da2/diff:/var/lib/docker/overlay2/2b2dd981ac7a4f0b97479ff6cd12a2d7641fc8dd15e022421b056e867240dbef/diff:/var/lib/docker/overlay2/25b7d56c2e9956ae4ebdd5ef8ac579ead4bf05b0c3ac2f007af5806253e6c979/diff:/var/lib/docker/overlay2/aec83a0766dfea50975b41eadeab442890bd1474054372a282604759a1e12734/diff:/var/lib/docker/overlay2/30b193faaea5c35488d128361242073dbf11a94d91c734c59eac23d9505854c6/diff:/var/lib/docker/overlay2/5062b8470deb15a95e9f76b1800fd79a558fdb552ca2f7185c2e091d4e5fa45c/diff:/var/lib/docker/overlay2/429a926c1b065b8ae2917977be11e5c4bc3137a20c86e26a7ace12fd2b5ae709/diff:/var/lib/docker/overlay2/9d9a81a63ebf515ac29084a89e740d2548c5d0116c87d0282041ddea1397d580/diff:/var/lib/docker/overlay2/565d41e3f4f8cb2bc0c7275f4d4e896c9a91ec7c67a8496f7ad8cf854df21443/diff:/var/lib/docker/overlay2/5bc40efc3fd125da6357a712fbd45640d2f6ed67914ea8821f0a3135a9042f0c/diff:/var/lib/docker/overlay2/531e0cf1ea72898b306828c82e13c368f68bef8185feca971f0753add420981f/diff:/var/lib/docker/overlay2/96f346a50004527548dbf3dc615ca8e2031a14a538e457de08677d6c1c2f7cf2/diff:/var/lib/docker/overlay2/054d43cf5981fb811f50d97306fa62e576973ef337ee030a5d625813361a29cc/diff:/var/lib/docker/overlay2/05b2ac7c377f338eaa94842c21d28f9636aa9855cfae3b56127f28c88979b3f4/diff:/var/lib/docker/overlay2/29dfacf204214bb7d6f94886349b4fea1e426695c939944412523e348d6ada85/diff", "MergedDir": "/var/lib/docker/overlay2/085ba4bfdfd202226e0fe293c2533ebc9d14979839ca780f20f70600c074ef27/merged", "UpperDir": "/var/lib/docker/overlay2/085ba4bfdfd202226e0fe293c2533ebc9d14979839ca780f20f70600c074ef27/diff", "WorkDir": "/var/lib/docker/overlay2/085ba4bfdfd202226e0fe293c2533ebc9d14979839ca780f20f70600c074ef27/work" }, "Name": "overlay2" }, "RootFS": { "Type": "layers", "Layers": [ "sha256:13cb14c2acd34e45446a50af25cb05095a17624678dbafbcc9e26086547c1d74", "sha256:4e53c951cb3be8dd433b04b4baaf5d7e3d28b8769e8ee695f9168b256e85754f", "sha256:a5df928da0a7242fe40ea6375f20d8434e1a5b88ad6453c3e4e1196d46a55187", "sha256:db497de51efd83c51695b81f35d1e73e3d6d99f645cad9e26777a474abe9f660", "sha256:fe216093409999341449fdc24c41bf40e73dd165f1df2e1616de862e6f9400a0", "sha256:5be09852131792826711673c0b2ee7abde7d52ada63c74de1c7f812182604106", "sha256:32e2a84acc26eaa3a3afaed80376a67c8498ddc6825622ac1c81ed7376741215", "sha256:fd0aeb60becb9fa5f74572c6c795dab4ff1a6bd02ca478f12d72fd727d7a7108", "sha256:7067740af29d7f41e77753a9df9902b6732a86223f802ab3dc753fd333ada955", "sha256:a1648f44ff3c321a85a4adea5559349f965dd5c0c34ba7f4e4e1a4b63052394e", "sha256:4798b6ae8fb0f1e184161493e03a048c98d91e3e39a2349743b02f7b1c4e2399", "sha256:262bd4bf0478b7d52a44a303a64154a348c4f51707b267b1014e876334e4fef6", "sha256:a778111f7b26f54be701dadbee9aa9f74da676c18af720bd654bcde02f965390", "sha256:72c7ca9bc95860db8073f923678ec39f484bf58bf55fda1347b765eec33a19a4", "sha256:590b1e1167fa3a7c12331c7677cdcf00de64cf4e1b7175092d3e5ecf1a94d926", "sha256:073e4123256b47db64a9afbe6f00a27e6bd5fd32ef7d64e381aa89a6c2347ca0", "sha256:22926dfe08d4dcfeebd02d4c59948598ee51990ce34f88cf8fdd9ba368bf5ea9", "sha256:3aff37ca4cb30ec1f32c21f73a8fab6f2e7446fda26c25686a113a143eb3d8ec", "sha256:5b87ef4d56afdd6c841793c471379e9e9682c422f051027326646b581d6d16c6", "sha256:dc6cb4512e8a38b27eee484bb627c1f53dbc99ef9c4a9a10498b688b7149a6a1" ] }, "Metadata": { "LastTagTime": "0001-01-01T00:00:00Z" } } ] There are the desired info?
  12. I wrote on this forum just because I have this difficulty. What else are the forums for?
  13. $ curl http://localhost:8000 The web page shows this thing: Fatal error: Uncaught Error: Call to undefined function yaml_parse_file() in /var/www/html/wp-content/plugins/mytest/main.php Maybe I have to install the php-yaml extension (or something similar). How you do it? Here is my docker-compose.yml file: version: '3.3' services: db: image: mysql:5.7 volumes: - dbdata:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: container_name: mytestplugin depends_on: - db image: wordpress:latest ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress volumes: - .:/var/www/html/wp-content/plugins/mytest volumes: dbdata:
  14. $ docker run \ --rm \ -v $(pwd):/data \ phpdockerio/php72-fpm \ --directory src \ --target docs docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"--directory\": executable file not found in $PATH": unknown. ERRO[0000] error waiting for container: context canceled But does it work for you? Can't you do some tests?
  15. I really think so. It will mean that I will await any future developments. Thanks anyway.
  16. The problem is that I don't speak English very well (I apologize). Could you explain yourself a little better? Besides the phpdoc / phpdoc container should I use a container with PHP 7.2? Could you give a practical example?
  17. $ docker run \ --rm \ -v $(pwd):/:/data phpdoc/phpdoc:7.2 \ --directory src \ --target docs Unable to find image 'phpdoc/phpdoc:7.2' locally docker: Error response from daemon: manifest for phpdoc/phpdoc:7.2 not found. See 'docker run --help'.
  18. $ docker run --rm -v $(pwd):/data phpdoc/phpdoc -d src -t docs # show the output web page (see attachment) $ firefox docs/classes/Examples.Example.html Because into the output web page, it appears Warning: count(): Parameter must be an array or an object that implements Countable......
  19. Look at these examples. Docblock only for the class: /** * Tool to format a text. */ class Formatter { function format() {} } Docblock only for the method: class Formatter { /** * Format a text. */ function format() {} } Docblocks for both (slightly diversified): /** * Tool to format a text. */ class Formatter { /** * Format a text. */ function format() {} } Identical docblocks for both (although they create a little redundancy for my taste): /** * Format a text. */ class Formatter { /** * Format a text. */ function format() {} } Do you usually use pattern[/ u] to comment on your classes?
  20. block34

    phpdoc not work

    Sorry, first time I use this form
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.