PageRenderTime 42ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/psy/psysh/README.md

https://gitlab.com/4gdevs/online-class-record-system
Markdown | 168 lines | 129 code | 39 blank | 0 comment | 0 complexity | 6b3842ec0f98a1c21ca0c53b3b4d81e1 MD5 | raw file
  1. # PsySH
  2. [![Package version](http://img.shields.io/packagist/v/psy/psysh.svg?style=flat-square)](https://packagist.org/packages/psy/psysh)
  3. [![Build status](http://img.shields.io/travis/bobthecow/psysh/master.svg?style=flat-square)](http://travis-ci.org/bobthecow/psysh)
  4. [![StyleCI](https://styleci.io/repos/4549925/shield)](https://styleci.io/repos/4549925)
  5. [![Made out of awesome](http://img.shields.io/badge/made_out_of_awesome-✓-brightgreen.svg?style=flat-square)](http://psysh.org)
  6. [![Join the chat at https://gitter.im/bobthecow/psysh](http://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg?style=flat-square)](https://gitter.im/bobthecow/psysh)
  7. ## About
  8. PsySH is a runtime developer console, interactive debugger and [REPL](http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) for PHP. Learn more at [psysh.org](http://psysh.org/). Check out the [Interactive Debugging in PHP talk from OSCON](https://presentate.com/bobthecow/talks/php-for-pirates) on Presentate.
  9. ## Installation
  10. Download the `psysh` phar to install:
  11. ```
  12. wget psysh.org/psysh
  13. chmod +x psysh
  14. ./psysh
  15. ```
  16. It's even awesomer if you put it somewhere in your system path (like `/usr/local/bin` or `~/bin`)!
  17. PsySH [is available via Composer](https://packagist.org/packages/psy/psysh), so you can use it in your project as well:
  18. ```
  19. composer require psy/psysh:@stable
  20. ./vendor/bin/psysh
  21. ```
  22. Or you can use by checking out the the repository directly:
  23. ```
  24. git clone https://github.com/bobthecow/psysh.git
  25. cd psysh
  26. ./bin/psysh
  27. ```
  28. ## PsySH configuration
  29. While PsySH strives to detect the right settings automatically, you might want to configure it yourself. Just add a file to `~/.config/psysh/config.php` (or `C:\Users\{USER}\AppData\Roaming\PsySH\config.php` on Windows):
  30. ```php
  31. <?php
  32. return array(
  33. // In PHP 5.4+, PsySH will default to your `cli.pager` ini setting. If this
  34. // is not set, it falls back to `less`. It is recommended that you set up
  35. // `cli.pager` in your `php.ini` with your preferred output pager.
  36. //
  37. // If you are running PHP 5.3, or if you want to use a different pager only
  38. // for Psy shell sessions, you can override it here.
  39. 'pager' => 'more',
  40. // Sets the maximum number of entries the history can contain.
  41. // If set to zero, the history size is unlimited.
  42. 'historySize' => 0,
  43. // If set to true, the history will not keep duplicate entries.
  44. // Newest entries override oldest.
  45. // This is the equivalent of the HISTCONTROL=erasedups setting in bash.
  46. 'eraseDuplicates' => false,
  47. // By default, PsySH will use a 'forking' execution loop if pcntl is
  48. // installed. This is by far the best way to use it, but you can override
  49. // the default by explicitly enabling or disabling this functionality here.
  50. 'usePcntl' => false,
  51. // PsySH uses readline if you have it installed, because interactive input
  52. // is pretty awful without it. But you can explicitly disable it if you hate
  53. // yourself or something.
  54. 'useReadline' => false,
  55. // PsySH automatically inserts semicolons at the end of input if a statement
  56. // is missing one. To disable this, set `requireSemicolons` to true.
  57. 'requireSemicolons' => true,
  58. // While PsySH respects the current `error_reporting` level, and doesn't throw
  59. // exceptions for all errors, it does log all errors regardless of level. Set
  60. // `errorLoggingLevel` to 0 to prevent logging non-thrown errors. Set it to any
  61. // valid `error_reporting` value to log only errors which match that level.
  62. 'errorLoggingLevel' => E_ALL & ~E_NOTICE,
  63. // "Default includes" will be included once at the beginning of every PsySH
  64. // session. This is a good place to add autoloaders for your favorite
  65. // libraries.
  66. 'defaultIncludes' => array(
  67. __DIR__ . '/include/bootstrap.php',
  68. ),
  69. // While PsySH ships with a bunch of great commands, it's possible to add
  70. // your own for even more awesome. Any Psy command added here will be
  71. // available in your Psy shell sessions.
  72. 'commands' => array(
  73. // The `parse` command is a command used in the development of PsySH.
  74. // Given a string of PHP code, it pretty-prints the
  75. // [PHP Parser](https://github.com/nikic/PHP-Parser) parse tree. It
  76. // prolly won't be super useful for most of you, but it's there if you
  77. // want to play :)
  78. new \Psy\Command\ParseCommand,
  79. ),
  80. // PsySH uses symfony/var-dumper's casters for presenting scalars, resources,
  81. // arrays and objects. You can enable additional casters, or write your own!
  82. // See http://symfony.com/doc/current/components/var_dumper/advanced.html#casters
  83. 'casters' => array(
  84. 'MyFooClass' => 'MyFooClassCaster::castMyFooObject',
  85. ),
  86. // You can disable tab completion if you want to. Not sure why you'd want to.
  87. 'tabCompletion' => false,
  88. // You can write your own tab completion matchers, too! Here are some that enable
  89. // tab completion for MongoDB database and collection names:
  90. 'tabCompletionMatchers' => array(
  91. new \Psy\TabCompletion\Matcher\MongoClientMatcher,
  92. new \Psy\TabCompletion\Matcher\MongoDatabaseMatcher,
  93. ),
  94. // If multiple versions of the same configuration or data file exist, PsySH will
  95. // use the file with highest precedence, and will silently ignore all others. With
  96. // this enabled, a warning will be emitted (but not an exception thrown) if multiple
  97. // configuration or data files are found.
  98. //
  99. // This will default to true in a future release, but is false for now.
  100. 'warnOnMultipleConfigs' => true,
  101. );
  102. ```
  103. ## Downloading the manual
  104. The PsySH `doc` command is great for documenting source code, but you'll need a little something extra for PHP core documentation. Download one of the following PHP Manual files and drop it in `~/.local/share/psysh/` (or `C:\Users\{USER}\AppData\Roaming\PsySH\` on Windows):
  105. * **[English](http://psysh.org/manual/en/php_manual.sqlite)**
  106. * [Brazilian Portuguese](http://psysh.org/manual/pt_BR/php_manual.sqlite)
  107. * [Chinese (Simplified)](http://psysh.org/manual/zh/php_manual.sqlite)
  108. * [French](http://psysh.org/manual/fr/php_manual.sqlite)
  109. * [German](http://psysh.org/manual/de/php_manual.sqlite)
  110. * [Italian](http://psysh.org/manual/it/php_manual.sqlite)
  111. * [Japanese](http://psysh.org/manual/ja/php_manual.sqlite)
  112. * [Polish](http://psysh.org/manual/pl/php_manual.sqlite)
  113. * [Romanian](http://psysh.org/manual/ro/php_manual.sqlite)
  114. * [Russian](http://psysh.org/manual/ru/php_manual.sqlite)
  115. * [Persian](http://psysh.org/manual/fa/php_manual.sqlite)
  116. * [Spanish](http://psysh.org/manual/es/php_manual.sqlite)
  117. * [Turkish](http://psysh.org/manual/tr/php_manual.sqlite)
  118. ## As Seen On
  119. * Cake: [`cake console`](http://book.cakephp.org/3.0/en/console-and-shells/repl.html)
  120. * Drupal: [`drush php`](http://drushcommands.com/drush-7x/core/core-cli), [drush-psysh](https://github.com/grota/drush-psysh)
  121. * eZ Publish: [`ezsh`](https://github.com/lolautruche/ezsh)
  122. * Laravel: [`artisan tinker`](https://github.com/laravel/framework/blob/5.0/src/Illuminate/Foundation/Console/TinkerCommand.php)
  123. * Lumen: [`artisan tinker`](https://github.com/vluzrmos/lumen-tinker)
  124. * Magento: [`magerun console`](https://github.com/netz98/n98-magerun/blob/develop/src/N98/Magento/Command/Developer/ConsoleCommand.php)
  125. * Pantheon CLI: [`terminus cli console`](https://github.com/pantheon-systems/cli)
  126. * Symfony: [sf1-psysh-bootstrap](https://github.com/varas/sf1-psysh-bootstrap)
  127. * Symfony2: [`psymf`](https://github.com/navitronic/psymf), [sf2-psysh-bootstrap](https://github.com/varas/sf2-psysh-bootstrap), [symfony-repl](https://github.com/luxifer/symfony-repl), [PsyshBundle](https://github.com/theofidry/PsyshBundle)
  128. * WordPress: [`wp-cli shell`](https://github.com/wp-cli/wp-cli/blob/master/php/commands/shell.php)
  129. * Zend Framework 2: [PsyshModule](https://zfmodules.com/gianarb/zf2-psysh-module)