├── .github ├── dependabot.yml └── workflows │ ├── automerge.yml │ └── phpstan.yml ├── .gitignore ├── LICENSE ├── LokiLoggerAttachment.php ├── LokiLoggerThread.php ├── README.md ├── composer.json ├── composer.lock └── phpstan.neon.dist /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | - package-ecosystem: "composer" 8 | directory: "/" 9 | schedule: 10 | interval: "daily" -------------------------------------------------------------------------------- /.github/workflows/automerge.yml: -------------------------------------------------------------------------------- 1 | name: Auto Merge Dependabot 2 | 3 | on: 4 | pull_request: 5 | types: [assigned, opened, synchronize, reopened] 6 | jobs: 7 | automerge: 8 | runs-on: ubuntu-latest 9 | permissions: write-all 10 | steps: 11 | - id: automerge 12 | name: automerge 13 | uses: pascalgn/automerge-action@v0.16.4 14 | env: 15 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 16 | MERGE_DELETE_BRANCH: true 17 | MERGE_FILTER_AUTHOR: dependabot[bot] 18 | MERGE_LABELS: '' 19 | MERGE_METHOD: squash -------------------------------------------------------------------------------- /.github/workflows/phpstan.yml: -------------------------------------------------------------------------------- 1 | name: PHPStan CI 2 | 3 | on: push 4 | 5 | jobs: 6 | phpstan: 7 | name: PHPStan Analysis 8 | runs-on: ubuntu-latest 9 | if: "!contains(github.event.head_commit.message, '[ci skip]')" 10 | 11 | steps: 12 | - uses: AutoModality/action-clean@v1 13 | - name: Startup 14 | uses: actions/checkout@v4 15 | with: 16 | token: ${{ secrets.ng_token }} 17 | submodules: true 18 | - name: Download PHP Release 19 | uses: dsaltares/fetch-gh-release-asset@1.1.2 20 | with: 21 | file: Linux.zip 22 | repo: NetherGamesMC/php-build-scripts 23 | version: "tags/8.1" 24 | token: ${{ secrets.GITHUB_TOKEN }} 25 | - name: Unpack PHP Release 26 | run: unzip Linux.zip && tar -xzvf PHP_Linux-x86_64.tar.gz 27 | - name: Download Composer 28 | run: curl -o composer.phar "https://getcomposer.org/composer-stable.phar" 29 | - name: Add Composer GitHub access token 30 | run: ./bin/php7/bin/php composer.phar config --global github-oauth.github.com ${{ secrets.ng_token }} 31 | - name: Install Composer dependencies 32 | run: ./bin/php7/bin/php composer.phar install --prefer-dist --no-interaction 33 | - name: Run PHPStan 34 | run: ./bin/php7/bin/php vendor/bin/phpstan.phar analyze --no-progress -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | [This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.] 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | How to Apply These Terms to Your New Libraries 461 | 462 | If you develop a new library, and you want it to be of the greatest 463 | possible use to the public, we recommend making it free software that 464 | everyone can redistribute and change. You can do so by permitting 465 | redistribution under these terms (or, alternatively, under the terms of the 466 | ordinary General Public License). 467 | 468 | To apply these terms, attach the following notices to the library. It is 469 | safest to attach them to the start of each source file to most effectively 470 | convey the exclusion of warranty; and each file should have at least the 471 | "copyright" line and a pointer to where the full notice is found. 472 | 473 | 474 | Copyright (C) 475 | 476 | This library is free software; you can redistribute it and/or 477 | modify it under the terms of the GNU Lesser General Public 478 | License as published by the Free Software Foundation; either 479 | version 2.1 of the License, or (at your option) any later version. 480 | 481 | This library is distributed in the hope that it will be useful, 482 | but WITHOUT ANY WARRANTY; without even the implied warranty of 483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 484 | Lesser General Public License for more details. 485 | 486 | You should have received a copy of the GNU Lesser General Public 487 | License along with this library; if not, write to the Free Software 488 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 489 | USA 490 | 491 | Also add information on how to contact you by electronic and paper mail. 492 | 493 | You should also get your employer (if you work as a programmer) or your 494 | school, if any, to sign a "copyright disclaimer" for the library, if 495 | necessary. Here is a sample; alter the names: 496 | 497 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 498 | library `Frob' (a library for tweaking knobs) written by James Random 499 | Hacker. 500 | 501 | , 1 April 1990 502 | Ty Coon, President of Vice 503 | 504 | That's all there is to it! -------------------------------------------------------------------------------- /LokiLoggerAttachment.php: -------------------------------------------------------------------------------- 1 | lokiInstance = LokiLoggerThread::getInstance(); 19 | } 20 | 21 | public function log($level, $message) 22 | { 23 | $thread = Thread::getCurrentThread(); 24 | if ($thread === null) { 25 | $threadName = "Server thread"; 26 | } elseif ($thread instanceof Thread or $thread instanceof Worker) { 27 | $threadName = $thread->getThreadName() . " thread"; 28 | } else { 29 | $threadName = (new ReflectionClass($thread))->getShortName() . " thread"; 30 | } 31 | 32 | $this->lokiInstance->write(preg_filter('/^\[(.*?)] /', '', TextFormat::clean($message)), ['level' => $level, 'thread' => $threadName]); 33 | } 34 | } -------------------------------------------------------------------------------- /LokiLoggerThread.php: -------------------------------------------------------------------------------- 1 | buffer = new Threaded(); 40 | $this->labels = igbinary_serialize($labels); 41 | 42 | self::setInstance($this); 43 | } 44 | 45 | /** 46 | * @param string $line The line of a particular log. 47 | * @param array $labels Optional label to identify the line information. 48 | * @return void 49 | */ 50 | public function write(string $line, array $labels = []): void 51 | { 52 | $currentTime = sprintf("%d", microtime(true) * 1000000000); 53 | $this->synchronized(function () use ($line, $currentTime, $labels): void { 54 | foreach (explode("\n", $line) as $l) { 55 | if ($l !== '') { 56 | $this->buffer[] = igbinary_serialize([$l, $currentTime, $labels]); 57 | } 58 | } 59 | 60 | $this->notify(); 61 | }); 62 | } 63 | 64 | public static function getInstance(): self 65 | { 66 | if (self::$instance === null) { 67 | throw new RuntimeException("Grafana Loki is not initialized properly in this environment."); 68 | } 69 | 70 | return self::$instance; 71 | } 72 | 73 | protected function onRun(): void 74 | { 75 | if (!empty($this->composerPath)) { 76 | require $this->composerPath; 77 | } 78 | 79 | $defaultLabels = igbinary_unserialize($this->labels); 80 | 81 | while (!$this->isKilled) { 82 | $start = microtime(true); 83 | 84 | $this->tickProcessor($defaultLabels); 85 | 86 | $time = microtime(true) - $start; 87 | if ($time < self::PUBLISHING_DELAY) { 88 | $sleepUntil = (int)((self::PUBLISHING_DELAY - $time) * 1000000); 89 | 90 | $this->synchronized(function () use ($sleepUntil): void { 91 | $this->wait($sleepUntil); 92 | }); 93 | } 94 | } 95 | 96 | $this->tickProcessor($defaultLabels); 97 | } 98 | 99 | private function tickProcessor(array $defaultLabels): void 100 | { 101 | $hasLogs = false; 102 | 103 | $mainStream = []; 104 | $secondaryStream = []; 105 | while ($this->buffer->count() > 0) { 106 | $buffer = $this->buffer->shift(); 107 | 108 | [$message, $timestamp, $labels] = igbinary_unserialize($buffer); 109 | 110 | if (empty($labels)) { 111 | $mainStream[] = [$timestamp, $message]; 112 | } else { 113 | $secondaryStream[] = [$labels, $timestamp, $message]; 114 | } 115 | 116 | $hasLogs = true; 117 | } 118 | 119 | if ($hasLogs) { 120 | $mainBody["streams"] = [["stream" => $defaultLabels, "values" => $mainStream]]; 121 | foreach ($secondaryStream as [$labels, $timestamp, $message]) { 122 | $mainBody["streams"][] = ["stream" => array_merge($defaultLabels, $labels), "values" => [[$timestamp, $message]]]; 123 | } 124 | 125 | // Retry one more time, if it fails again, we just ignore it and move on to the next logs. 126 | $this->postContent(json_encode($mainBody), 1); 127 | } 128 | } 129 | 130 | private function postContent(string $jsonPayload, int $retries): void 131 | { 132 | try { 133 | $v = Internet::simpleCurl($this->endpoint . '/loki/api/v1/push', 10, [ 134 | "User-Agent: NetherGamesMC/libLokiLogger", 135 | 'Content-Type: application/json', 136 | 'Content-Length: ' . strlen($jsonPayload) 137 | ], [ 138 | CURLOPT_POST => 1, 139 | CURLOPT_HTTPAUTH => CURLAUTH_BASIC, 140 | CURLOPT_CUSTOMREQUEST => 'POST', 141 | CURLOPT_RETURNTRANSFER => true, 142 | CURLOPT_POSTFIELDS => $jsonPayload 143 | ]); 144 | 145 | if ($v->getCode() !== 204 && $retries > 0) { 146 | $this->postContent($jsonPayload, $retries - 1); 147 | } 148 | } catch (InternetException) { 149 | if ($retries > 0) { 150 | $this->postContent($jsonPayload, $retries - 1); 151 | } 152 | } 153 | } 154 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # libLokiLogger 2 | 3 | [Grafana Loki](https://grafana.com/oss/loki/) asynchronous logging utility for PocketMine-MP logger. It will log 4 | everything from any threads you want. 5 | 6 | # Getting started 7 | 8 | You will have to initialize and start `LokiLoggerThread` process in your plugin, you can supply your own composer autoloader path 9 | if you are using php's composer. 10 | 11 | Here is the code to start using the project: 12 | ```php 13 | # Start logging thread. 14 | $lokiFactory = new LokiLoggerThread(COMPOSER_AUTOLOADER_PATH, 'http://localhost:1300', ['app' => 'lobby-1', 'region' => 'ap', 'server-id' => '1']); 15 | $lokiFactory->start(); 16 | 17 | $this->getServer()->getAsyncPool()->addWorkerStartHook(function (int $workerId) use ($lokiFactory): void { 18 | $this->getServer()->getAsyncPool()->submitTaskToWorker(new LokiRegisterAsyncTask($lokiFactory), $workerId); 19 | }); 20 | 21 | # Add an attachment to the server's logger, this will log everything in console into grafana loki. 22 | Server::getInstance()->getLogger()->addAttachment(new LokiLoggerAttachment()); 23 | ``` -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nethergamesmc/liblokilogger", 3 | "description": "Small and compact Grafana Loki logger for PocketMine-MP", 4 | "type": "project", 5 | "license": "GPL-2.0+", 6 | "require": { 7 | "php": "^8.0" 8 | }, 9 | "require-dev": { 10 | "phpstan/phpstan": "2.0.3", 11 | "pocketmine/pocketmine-mp": "dev-stable" 12 | }, 13 | "autoload": { 14 | "psr-4": { 15 | "libLokiLogger\\": "/" 16 | } 17 | }, 18 | "minimum-stability": "dev" 19 | } 20 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "877a480e2fe04a9751413120323593ba", 8 | "packages": [], 9 | "packages-dev": [ 10 | { 11 | "name": "adhocore/json-comment", 12 | "version": "1.1.2", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/adhocore/php-json-comment.git", 16 | "reference": "fc2f76979f0a44a5f5bc2a2b600d0762fe0e78e7" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/adhocore/php-json-comment/zipball/fc2f76979f0a44a5f5bc2a2b600d0762fe0e78e7", 21 | "reference": "fc2f76979f0a44a5f5bc2a2b600d0762fe0e78e7", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "ext-ctype": "*", 26 | "php": ">=7.0" 27 | }, 28 | "require-dev": { 29 | "phpunit/phpunit": "^6.5 || ^7.5 || ^8.5" 30 | }, 31 | "type": "library", 32 | "autoload": { 33 | "psr-4": { 34 | "Ahc\\Json\\": "src/" 35 | } 36 | }, 37 | "notification-url": "https://packagist.org/downloads/", 38 | "license": [ 39 | "MIT" 40 | ], 41 | "authors": [ 42 | { 43 | "name": "Jitendra Adhikari", 44 | "email": "jiten.adhikary@gmail.com" 45 | } 46 | ], 47 | "description": "Lightweight JSON comment stripper library for PHP", 48 | "keywords": [ 49 | "comment", 50 | "json", 51 | "strip-comment" 52 | ], 53 | "support": { 54 | "issues": "https://github.com/adhocore/php-json-comment/issues", 55 | "source": "https://github.com/adhocore/php-json-comment/tree/1.1.2" 56 | }, 57 | "funding": [ 58 | { 59 | "url": "https://paypal.me/ji10", 60 | "type": "custom" 61 | } 62 | ], 63 | "time": "2021-04-09T03:06:06+00:00" 64 | }, 65 | { 66 | "name": "brick/math", 67 | "version": "0.9.3", 68 | "source": { 69 | "type": "git", 70 | "url": "https://github.com/brick/math.git", 71 | "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae" 72 | }, 73 | "dist": { 74 | "type": "zip", 75 | "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae", 76 | "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae", 77 | "shasum": "" 78 | }, 79 | "require": { 80 | "ext-json": "*", 81 | "php": "^7.1 || ^8.0" 82 | }, 83 | "require-dev": { 84 | "php-coveralls/php-coveralls": "^2.2", 85 | "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0", 86 | "vimeo/psalm": "4.9.2" 87 | }, 88 | "type": "library", 89 | "autoload": { 90 | "psr-4": { 91 | "Brick\\Math\\": "src/" 92 | } 93 | }, 94 | "notification-url": "https://packagist.org/downloads/", 95 | "license": [ 96 | "MIT" 97 | ], 98 | "description": "Arbitrary-precision arithmetic library", 99 | "keywords": [ 100 | "Arbitrary-precision", 101 | "BigInteger", 102 | "BigRational", 103 | "arithmetic", 104 | "bigdecimal", 105 | "bignum", 106 | "brick", 107 | "math" 108 | ], 109 | "support": { 110 | "issues": "https://github.com/brick/math/issues", 111 | "source": "https://github.com/brick/math/tree/0.9.3" 112 | }, 113 | "funding": [ 114 | { 115 | "url": "https://github.com/BenMorel", 116 | "type": "github" 117 | }, 118 | { 119 | "url": "https://tidelift.com/funding/github/packagist/brick/math", 120 | "type": "tidelift" 121 | } 122 | ], 123 | "time": "2021-08-15T20:50:18+00:00" 124 | }, 125 | { 126 | "name": "fgrosse/phpasn1", 127 | "version": "v2.4.0", 128 | "source": { 129 | "type": "git", 130 | "url": "https://github.com/fgrosse/PHPASN1.git", 131 | "reference": "eef488991d53e58e60c9554b09b1201ca5ba9296" 132 | }, 133 | "dist": { 134 | "type": "zip", 135 | "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/eef488991d53e58e60c9554b09b1201ca5ba9296", 136 | "reference": "eef488991d53e58e60c9554b09b1201ca5ba9296", 137 | "shasum": "" 138 | }, 139 | "require": { 140 | "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0" 141 | }, 142 | "require-dev": { 143 | "php-coveralls/php-coveralls": "~2.0", 144 | "phpunit/phpunit": "^6.3 || ^7.0 || ^8.0" 145 | }, 146 | "suggest": { 147 | "ext-bcmath": "BCmath is the fallback extension for big integer calculations", 148 | "ext-curl": "For loading OID information from the web if they have not bee defined statically", 149 | "ext-gmp": "GMP is the preferred extension for big integer calculations", 150 | "phpseclib/bcmath_compat": "BCmath polyfill for servers where neither GMP nor BCmath is available" 151 | }, 152 | "type": "library", 153 | "extra": { 154 | "branch-alias": { 155 | "dev-master": "2.0.x-dev" 156 | } 157 | }, 158 | "autoload": { 159 | "psr-4": { 160 | "FG\\": "lib/" 161 | } 162 | }, 163 | "notification-url": "https://packagist.org/downloads/", 164 | "license": [ 165 | "MIT" 166 | ], 167 | "authors": [ 168 | { 169 | "name": "Friedrich Große", 170 | "email": "friedrich.grosse@gmail.com", 171 | "homepage": "https://github.com/FGrosse", 172 | "role": "Author" 173 | }, 174 | { 175 | "name": "All contributors", 176 | "homepage": "https://github.com/FGrosse/PHPASN1/contributors" 177 | } 178 | ], 179 | "description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.", 180 | "homepage": "https://github.com/FGrosse/PHPASN1", 181 | "keywords": [ 182 | "DER", 183 | "asn.1", 184 | "asn1", 185 | "ber", 186 | "binary", 187 | "decoding", 188 | "encoding", 189 | "x.509", 190 | "x.690", 191 | "x509", 192 | "x690" 193 | ], 194 | "support": { 195 | "issues": "https://github.com/fgrosse/PHPASN1/issues", 196 | "source": "https://github.com/fgrosse/PHPASN1/tree/v2.4.0" 197 | }, 198 | "time": "2021-12-11T12:41:06+00:00" 199 | }, 200 | { 201 | "name": "netresearch/jsonmapper", 202 | "version": "v4.0.0", 203 | "source": { 204 | "type": "git", 205 | "url": "https://github.com/cweiske/jsonmapper.git", 206 | "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" 207 | }, 208 | "dist": { 209 | "type": "zip", 210 | "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", 211 | "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", 212 | "shasum": "" 213 | }, 214 | "require": { 215 | "ext-json": "*", 216 | "ext-pcre": "*", 217 | "ext-reflection": "*", 218 | "ext-spl": "*", 219 | "php": ">=7.1" 220 | }, 221 | "require-dev": { 222 | "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", 223 | "squizlabs/php_codesniffer": "~3.5" 224 | }, 225 | "type": "library", 226 | "autoload": { 227 | "psr-0": { 228 | "JsonMapper": "src/" 229 | } 230 | }, 231 | "notification-url": "https://packagist.org/downloads/", 232 | "license": [ 233 | "OSL-3.0" 234 | ], 235 | "authors": [ 236 | { 237 | "name": "Christian Weiske", 238 | "email": "cweiske@cweiske.de", 239 | "homepage": "http://github.com/cweiske/jsonmapper/", 240 | "role": "Developer" 241 | } 242 | ], 243 | "description": "Map nested JSON structures onto PHP classes", 244 | "support": { 245 | "email": "cweiske@cweiske.de", 246 | "issues": "https://github.com/cweiske/jsonmapper/issues", 247 | "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" 248 | }, 249 | "time": "2020-12-01T19:48:11+00:00" 250 | }, 251 | { 252 | "name": "phpstan/phpstan", 253 | "version": "2.0.3", 254 | "source": { 255 | "type": "git", 256 | "url": "https://github.com/phpstan/phpstan.git", 257 | "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4" 258 | }, 259 | "dist": { 260 | "type": "zip", 261 | "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46b4d3529b12178112d9008337beda0cc2a1a6b4", 262 | "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4", 263 | "shasum": "" 264 | }, 265 | "require": { 266 | "php": "^7.4|^8.0" 267 | }, 268 | "conflict": { 269 | "phpstan/phpstan-shim": "*" 270 | }, 271 | "bin": [ 272 | "phpstan", 273 | "phpstan.phar" 274 | ], 275 | "type": "library", 276 | "autoload": { 277 | "files": [ 278 | "bootstrap.php" 279 | ] 280 | }, 281 | "notification-url": "https://packagist.org/downloads/", 282 | "license": [ 283 | "MIT" 284 | ], 285 | "description": "PHPStan - PHP Static Analysis Tool", 286 | "keywords": [ 287 | "dev", 288 | "static analysis" 289 | ], 290 | "support": { 291 | "docs": "https://phpstan.org/user-guide/getting-started", 292 | "forum": "https://github.com/phpstan/phpstan/discussions", 293 | "issues": "https://github.com/phpstan/phpstan/issues", 294 | "security": "https://github.com/phpstan/phpstan/security/policy", 295 | "source": "https://github.com/phpstan/phpstan-src" 296 | }, 297 | "funding": [ 298 | { 299 | "url": "https://github.com/ondrejmirtes", 300 | "type": "github" 301 | }, 302 | { 303 | "url": "https://github.com/phpstan", 304 | "type": "github" 305 | } 306 | ], 307 | "time": "2024-11-28T22:19:37+00:00" 308 | }, 309 | { 310 | "name": "pocketmine/bedrock-data", 311 | "version": "1.8.0+bedrock-1.19.0", 312 | "source": { 313 | "type": "git", 314 | "url": "https://github.com/pmmp/BedrockData.git", 315 | "reference": "e654d0a6e5dfd55f8546097ea629c528a70c30ee" 316 | }, 317 | "dist": { 318 | "type": "zip", 319 | "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/e654d0a6e5dfd55f8546097ea629c528a70c30ee", 320 | "reference": "e654d0a6e5dfd55f8546097ea629c528a70c30ee", 321 | "shasum": "" 322 | }, 323 | "type": "library", 324 | "notification-url": "https://packagist.org/downloads/", 325 | "license": [ 326 | "CC0-1.0" 327 | ], 328 | "description": "Blobs of data generated from Minecraft: Bedrock Edition, used by PocketMine-MP", 329 | "support": { 330 | "issues": "https://github.com/pmmp/BedrockData/issues", 331 | "source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.19.0" 332 | }, 333 | "time": "2022-06-07T16:20:20+00:00" 334 | }, 335 | { 336 | "name": "pocketmine/bedrock-protocol", 337 | "version": "10.0.1+bedrock-1.19.0", 338 | "source": { 339 | "type": "git", 340 | "url": "https://github.com/pmmp/BedrockProtocol.git", 341 | "reference": "331fb0eb45c26daadf8cf01a3b6f20e909d7684b" 342 | }, 343 | "dist": { 344 | "type": "zip", 345 | "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/331fb0eb45c26daadf8cf01a3b6f20e909d7684b", 346 | "reference": "331fb0eb45c26daadf8cf01a3b6f20e909d7684b", 347 | "shasum": "" 348 | }, 349 | "require": { 350 | "ext-json": "*", 351 | "netresearch/jsonmapper": "^4.0", 352 | "php": "^8.0", 353 | "pocketmine/binaryutils": "^0.2.0", 354 | "pocketmine/color": "^0.2.0", 355 | "pocketmine/math": "^0.3.0 || ^0.4.0", 356 | "pocketmine/nbt": "^0.3.0", 357 | "ramsey/uuid": "^4.1" 358 | }, 359 | "require-dev": { 360 | "phpstan/phpstan": "1.7.11", 361 | "phpstan/phpstan-phpunit": "^1.0.0", 362 | "phpstan/phpstan-strict-rules": "^1.0.0", 363 | "phpunit/phpunit": "^9.5" 364 | }, 365 | "type": "library", 366 | "autoload": { 367 | "psr-4": { 368 | "pocketmine\\network\\mcpe\\protocol\\": "src/" 369 | } 370 | }, 371 | "notification-url": "https://packagist.org/downloads/", 372 | "license": [ 373 | "LGPL-3.0" 374 | ], 375 | "description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP", 376 | "support": { 377 | "issues": "https://github.com/pmmp/BedrockProtocol/issues", 378 | "source": "https://github.com/pmmp/BedrockProtocol/tree/10.0.1+bedrock-1.19.0" 379 | }, 380 | "time": "2022-06-08T01:11:15+00:00" 381 | }, 382 | { 383 | "name": "pocketmine/binaryutils", 384 | "version": "0.2.4", 385 | "source": { 386 | "type": "git", 387 | "url": "https://github.com/pmmp/BinaryUtils.git", 388 | "reference": "5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a" 389 | }, 390 | "dist": { 391 | "type": "zip", 392 | "url": "https://api.github.com/repos/pmmp/BinaryUtils/zipball/5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a", 393 | "reference": "5ac7eea91afbad8dc498f5ce34ce6297d5e6ea9a", 394 | "shasum": "" 395 | }, 396 | "require": { 397 | "php": "^7.4 || ^8.0", 398 | "php-64bit": "*" 399 | }, 400 | "require-dev": { 401 | "phpstan/extension-installer": "^1.0", 402 | "phpstan/phpstan": "1.3.0", 403 | "phpstan/phpstan-phpunit": "^1.0", 404 | "phpstan/phpstan-strict-rules": "^1.0.0", 405 | "phpunit/phpunit": "^9.5" 406 | }, 407 | "type": "library", 408 | "autoload": { 409 | "psr-4": { 410 | "pocketmine\\utils\\": "src/" 411 | } 412 | }, 413 | "notification-url": "https://packagist.org/downloads/", 414 | "license": [ 415 | "LGPL-3.0" 416 | ], 417 | "description": "Classes and methods for conveniently handling binary data", 418 | "support": { 419 | "issues": "https://github.com/pmmp/BinaryUtils/issues", 420 | "source": "https://github.com/pmmp/BinaryUtils/tree/0.2.4" 421 | }, 422 | "time": "2022-01-12T18:06:33+00:00" 423 | }, 424 | { 425 | "name": "pocketmine/callback-validator", 426 | "version": "1.0.3", 427 | "source": { 428 | "type": "git", 429 | "url": "https://github.com/pmmp/CallbackValidator.git", 430 | "reference": "64787469766bcaa7e5885242e85c23c25e8c55a2" 431 | }, 432 | "dist": { 433 | "type": "zip", 434 | "url": "https://api.github.com/repos/pmmp/CallbackValidator/zipball/64787469766bcaa7e5885242e85c23c25e8c55a2", 435 | "reference": "64787469766bcaa7e5885242e85c23c25e8c55a2", 436 | "shasum": "" 437 | }, 438 | "require": { 439 | "ext-reflection": "*", 440 | "php": "^7.1 || ^8.0" 441 | }, 442 | "replace": { 443 | "daverandom/callback-validator": "*" 444 | }, 445 | "require-dev": { 446 | "phpstan/extension-installer": "^1.0", 447 | "phpstan/phpstan": "0.12.59", 448 | "phpstan/phpstan-strict-rules": "^0.12.4", 449 | "phpunit/phpunit": "^7.5 || ^8.5 || ^9.0" 450 | }, 451 | "type": "library", 452 | "autoload": { 453 | "psr-4": { 454 | "DaveRandom\\CallbackValidator\\": "src/" 455 | } 456 | }, 457 | "notification-url": "https://packagist.org/downloads/", 458 | "license": [ 459 | "MIT" 460 | ], 461 | "authors": [ 462 | { 463 | "name": "Chris Wright", 464 | "email": "cw@daverandom.com" 465 | } 466 | ], 467 | "description": "Fork of daverandom/callback-validator - Tools for validating callback signatures", 468 | "support": { 469 | "issues": "https://github.com/pmmp/CallbackValidator/issues", 470 | "source": "https://github.com/pmmp/CallbackValidator/tree/1.0.3" 471 | }, 472 | "time": "2020-12-11T01:45:37+00:00" 473 | }, 474 | { 475 | "name": "pocketmine/classloader", 476 | "version": "0.2.0", 477 | "source": { 478 | "type": "git", 479 | "url": "https://github.com/pmmp/ClassLoader.git", 480 | "reference": "49ea303993efdfb39cd302e2156d50aa78209e78" 481 | }, 482 | "dist": { 483 | "type": "zip", 484 | "url": "https://api.github.com/repos/pmmp/ClassLoader/zipball/49ea303993efdfb39cd302e2156d50aa78209e78", 485 | "reference": "49ea303993efdfb39cd302e2156d50aa78209e78", 486 | "shasum": "" 487 | }, 488 | "require": { 489 | "ext-pthreads": "~3.2.0 || ^4.0", 490 | "ext-reflection": "*", 491 | "php": "^8.0" 492 | }, 493 | "conflict": { 494 | "pocketmine/spl": "<0.4" 495 | }, 496 | "require-dev": { 497 | "phpstan/extension-installer": "^1.0", 498 | "phpstan/phpstan": "0.12.99", 499 | "phpstan/phpstan-strict-rules": "^0.12.4", 500 | "phpunit/phpunit": "^9.5" 501 | }, 502 | "type": "library", 503 | "autoload": { 504 | "classmap": [ 505 | "./src" 506 | ] 507 | }, 508 | "notification-url": "https://packagist.org/downloads/", 509 | "license": [ 510 | "LGPL-3.0" 511 | ], 512 | "description": "Ad-hoc autoloading components used by PocketMine-MP", 513 | "support": { 514 | "issues": "https://github.com/pmmp/ClassLoader/issues", 515 | "source": "https://github.com/pmmp/ClassLoader/tree/0.2.0" 516 | }, 517 | "time": "2021-11-01T20:17:27+00:00" 518 | }, 519 | { 520 | "name": "pocketmine/color", 521 | "version": "0.2.0", 522 | "source": { 523 | "type": "git", 524 | "url": "https://github.com/pmmp/Color.git", 525 | "reference": "09be6ea6d76f2e33d6813c39d29c22c46c17e1d2" 526 | }, 527 | "dist": { 528 | "type": "zip", 529 | "url": "https://api.github.com/repos/pmmp/Color/zipball/09be6ea6d76f2e33d6813c39d29c22c46c17e1d2", 530 | "reference": "09be6ea6d76f2e33d6813c39d29c22c46c17e1d2", 531 | "shasum": "" 532 | }, 533 | "require": { 534 | "php": "^7.2 || ^8.0" 535 | }, 536 | "require-dev": { 537 | "phpstan/phpstan": "0.12.59", 538 | "phpstan/phpstan-strict-rules": "^0.12.2" 539 | }, 540 | "type": "library", 541 | "autoload": { 542 | "psr-4": { 543 | "pocketmine\\color\\": "src/" 544 | } 545 | }, 546 | "notification-url": "https://packagist.org/downloads/", 547 | "license": [ 548 | "LGPL-3.0" 549 | ], 550 | "description": "Color handling library used by PocketMine-MP and related projects", 551 | "support": { 552 | "issues": "https://github.com/pmmp/Color/issues", 553 | "source": "https://github.com/pmmp/Color/tree/0.2.0" 554 | }, 555 | "time": "2020-12-11T01:24:32+00:00" 556 | }, 557 | { 558 | "name": "pocketmine/errorhandler", 559 | "version": "0.6.0", 560 | "source": { 561 | "type": "git", 562 | "url": "https://github.com/pmmp/ErrorHandler.git", 563 | "reference": "dae214a04348b911e8219ebf125ff1c5589cc878" 564 | }, 565 | "dist": { 566 | "type": "zip", 567 | "url": "https://api.github.com/repos/pmmp/ErrorHandler/zipball/dae214a04348b911e8219ebf125ff1c5589cc878", 568 | "reference": "dae214a04348b911e8219ebf125ff1c5589cc878", 569 | "shasum": "" 570 | }, 571 | "require": { 572 | "php": "^8.0" 573 | }, 574 | "require-dev": { 575 | "phpstan/phpstan": "0.12.99", 576 | "phpstan/phpstan-strict-rules": "^0.12.2", 577 | "phpunit/phpunit": "^9.5" 578 | }, 579 | "type": "library", 580 | "autoload": { 581 | "psr-4": { 582 | "pocketmine\\errorhandler\\": "src/" 583 | } 584 | }, 585 | "notification-url": "https://packagist.org/downloads/", 586 | "license": [ 587 | "LGPL-3.0" 588 | ], 589 | "description": "Utilities to handle nasty PHP E_* errors in a usable way", 590 | "support": { 591 | "issues": "https://github.com/pmmp/ErrorHandler/issues", 592 | "source": "https://github.com/pmmp/ErrorHandler/tree/0.6.0" 593 | }, 594 | "time": "2022-01-08T21:05:46+00:00" 595 | }, 596 | { 597 | "name": "pocketmine/locale-data", 598 | "version": "2.8.3", 599 | "source": { 600 | "type": "git", 601 | "url": "https://github.com/pmmp/Language.git", 602 | "reference": "113c115a3b8976917eb22b74dccab464831b6483" 603 | }, 604 | "dist": { 605 | "type": "zip", 606 | "url": "https://api.github.com/repos/pmmp/Language/zipball/113c115a3b8976917eb22b74dccab464831b6483", 607 | "reference": "113c115a3b8976917eb22b74dccab464831b6483", 608 | "shasum": "" 609 | }, 610 | "type": "library", 611 | "notification-url": "https://packagist.org/downloads/", 612 | "description": "Language resources used by PocketMine-MP", 613 | "support": { 614 | "issues": "https://github.com/pmmp/Language/issues", 615 | "source": "https://github.com/pmmp/Language/tree/2.8.3" 616 | }, 617 | "time": "2022-05-11T13:51:37+00:00" 618 | }, 619 | { 620 | "name": "pocketmine/log", 621 | "version": "0.4.0", 622 | "source": { 623 | "type": "git", 624 | "url": "https://github.com/pmmp/Log.git", 625 | "reference": "e6c912c0f9055c81d23108ec2d179b96f404c043" 626 | }, 627 | "dist": { 628 | "type": "zip", 629 | "url": "https://api.github.com/repos/pmmp/Log/zipball/e6c912c0f9055c81d23108ec2d179b96f404c043", 630 | "reference": "e6c912c0f9055c81d23108ec2d179b96f404c043", 631 | "shasum": "" 632 | }, 633 | "require": { 634 | "php": "^7.4 || ^8.0" 635 | }, 636 | "conflict": { 637 | "pocketmine/spl": "<0.4" 638 | }, 639 | "require-dev": { 640 | "phpstan/phpstan": "0.12.88", 641 | "phpstan/phpstan-strict-rules": "^0.12.2" 642 | }, 643 | "type": "library", 644 | "autoload": { 645 | "classmap": [ 646 | "./src" 647 | ] 648 | }, 649 | "notification-url": "https://packagist.org/downloads/", 650 | "license": [ 651 | "LGPL-3.0" 652 | ], 653 | "description": "Logging components used by PocketMine-MP and related projects", 654 | "support": { 655 | "issues": "https://github.com/pmmp/Log/issues", 656 | "source": "https://github.com/pmmp/Log/tree/0.4.0" 657 | }, 658 | "time": "2021-06-18T19:08:09+00:00" 659 | }, 660 | { 661 | "name": "pocketmine/log-pthreads", 662 | "version": "0.4.0", 663 | "source": { 664 | "type": "git", 665 | "url": "https://github.com/pmmp/LogPthreads.git", 666 | "reference": "61f709e8cf36bcc24e4efe02acded680a1ce23cd" 667 | }, 668 | "dist": { 669 | "type": "zip", 670 | "url": "https://api.github.com/repos/pmmp/LogPthreads/zipball/61f709e8cf36bcc24e4efe02acded680a1ce23cd", 671 | "reference": "61f709e8cf36bcc24e4efe02acded680a1ce23cd", 672 | "shasum": "" 673 | }, 674 | "require": { 675 | "ext-pthreads": "~3.2.0 || ^4.0", 676 | "php": "^7.4 || ^8.0", 677 | "pocketmine/log": "^0.4.0" 678 | }, 679 | "conflict": { 680 | "pocketmine/spl": "<0.4" 681 | }, 682 | "require-dev": { 683 | "phpstan/extension-installer": "^1.0", 684 | "phpstan/phpstan": "0.12.88", 685 | "phpstan/phpstan-strict-rules": "^0.12.4" 686 | }, 687 | "type": "library", 688 | "autoload": { 689 | "classmap": [ 690 | "./src" 691 | ] 692 | }, 693 | "notification-url": "https://packagist.org/downloads/", 694 | "license": [ 695 | "LGPL-3.0" 696 | ], 697 | "description": "Logging components specialized for pthreads used by PocketMine-MP and related projects", 698 | "support": { 699 | "issues": "https://github.com/pmmp/LogPthreads/issues", 700 | "source": "https://github.com/pmmp/LogPthreads/tree/0.4.0" 701 | }, 702 | "time": "2021-11-01T21:42:09+00:00" 703 | }, 704 | { 705 | "name": "pocketmine/math", 706 | "version": "0.4.2", 707 | "source": { 708 | "type": "git", 709 | "url": "https://github.com/pmmp/Math.git", 710 | "reference": "aacc3759a508a69dfa5bc4dfa770ab733c5c94bf" 711 | }, 712 | "dist": { 713 | "type": "zip", 714 | "url": "https://api.github.com/repos/pmmp/Math/zipball/aacc3759a508a69dfa5bc4dfa770ab733c5c94bf", 715 | "reference": "aacc3759a508a69dfa5bc4dfa770ab733c5c94bf", 716 | "shasum": "" 717 | }, 718 | "require": { 719 | "php": "^8.0", 720 | "php-64bit": "*" 721 | }, 722 | "require-dev": { 723 | "phpstan/extension-installer": "^1.0", 724 | "phpstan/phpstan": "1.2.0", 725 | "phpstan/phpstan-strict-rules": "^1.0", 726 | "phpunit/phpunit": "^8.5 || ^9.5" 727 | }, 728 | "type": "library", 729 | "autoload": { 730 | "psr-4": { 731 | "pocketmine\\math\\": "src/" 732 | } 733 | }, 734 | "notification-url": "https://packagist.org/downloads/", 735 | "license": [ 736 | "LGPL-3.0" 737 | ], 738 | "description": "PHP library containing math related code used in PocketMine-MP", 739 | "support": { 740 | "issues": "https://github.com/pmmp/Math/issues", 741 | "source": "https://github.com/pmmp/Math/tree/0.4.2" 742 | }, 743 | "time": "2021-12-05T01:15:17+00:00" 744 | }, 745 | { 746 | "name": "pocketmine/nbt", 747 | "version": "0.3.2", 748 | "source": { 749 | "type": "git", 750 | "url": "https://github.com/pmmp/NBT.git", 751 | "reference": "3e0d9ef6b6c5fb45e3745a121296e75631b3eefe" 752 | }, 753 | "dist": { 754 | "type": "zip", 755 | "url": "https://api.github.com/repos/pmmp/NBT/zipball/3e0d9ef6b6c5fb45e3745a121296e75631b3eefe", 756 | "reference": "3e0d9ef6b6c5fb45e3745a121296e75631b3eefe", 757 | "shasum": "" 758 | }, 759 | "require": { 760 | "php": "^7.4 || ^8.0", 761 | "php-64bit": "*", 762 | "pocketmine/binaryutils": "^0.2.0" 763 | }, 764 | "require-dev": { 765 | "phpstan/extension-installer": "^1.0", 766 | "phpstan/phpstan": "1.2.0", 767 | "phpstan/phpstan-strict-rules": "^1.0", 768 | "phpunit/phpunit": "^9.5" 769 | }, 770 | "type": "library", 771 | "autoload": { 772 | "psr-4": { 773 | "pocketmine\\nbt\\": "src/" 774 | } 775 | }, 776 | "notification-url": "https://packagist.org/downloads/", 777 | "license": [ 778 | "LGPL-3.0" 779 | ], 780 | "description": "PHP library for working with Named Binary Tags", 781 | "support": { 782 | "issues": "https://github.com/pmmp/NBT/issues", 783 | "source": "https://github.com/pmmp/NBT/tree/0.3.2" 784 | }, 785 | "time": "2021-12-16T01:02:37+00:00" 786 | }, 787 | { 788 | "name": "pocketmine/pocketmine-mp", 789 | "version": "dev-stable", 790 | "source": { 791 | "type": "git", 792 | "url": "https://github.com/pmmp/PocketMine-MP.git", 793 | "reference": "68e704bf97f318cc961f9e59ffae117097b5ca1b" 794 | }, 795 | "dist": { 796 | "type": "zip", 797 | "url": "https://api.github.com/repos/pmmp/PocketMine-MP/zipball/68e704bf97f318cc961f9e59ffae117097b5ca1b", 798 | "reference": "68e704bf97f318cc961f9e59ffae117097b5ca1b", 799 | "shasum": "" 800 | }, 801 | "require": { 802 | "adhocore/json-comment": "^1.1", 803 | "composer-runtime-api": "^2.0", 804 | "ext-chunkutils2": "^0.3.1", 805 | "ext-crypto": "^0.3.1", 806 | "ext-ctype": "*", 807 | "ext-curl": "*", 808 | "ext-date": "*", 809 | "ext-gmp": "*", 810 | "ext-hash": "*", 811 | "ext-igbinary": "^3.0.1", 812 | "ext-json": "*", 813 | "ext-leveldb": "^0.2.1 || ^0.3.0", 814 | "ext-mbstring": "*", 815 | "ext-morton": "^0.1.0", 816 | "ext-openssl": "*", 817 | "ext-pcre": "*", 818 | "ext-phar": "*", 819 | "ext-pthreads": "^4.0", 820 | "ext-reflection": "*", 821 | "ext-simplexml": "*", 822 | "ext-sockets": "*", 823 | "ext-spl": "*", 824 | "ext-yaml": ">=2.0.0", 825 | "ext-zip": "*", 826 | "ext-zlib": ">=1.2.11", 827 | "fgrosse/phpasn1": "^2.3", 828 | "netresearch/jsonmapper": "^4.0", 829 | "php": "^8.0", 830 | "php-64bit": "*", 831 | "pocketmine/bedrock-data": "~1.8.0+bedrock-1.19.0", 832 | "pocketmine/bedrock-protocol": "~10.0.0+bedrock-1.19.0", 833 | "pocketmine/binaryutils": "^0.2.1", 834 | "pocketmine/callback-validator": "^1.0.2", 835 | "pocketmine/classloader": "^0.2.0", 836 | "pocketmine/color": "^0.2.0", 837 | "pocketmine/errorhandler": "^0.6.0", 838 | "pocketmine/locale-data": "~2.8.0", 839 | "pocketmine/log": "^0.4.0", 840 | "pocketmine/log-pthreads": "^0.4.0", 841 | "pocketmine/math": "^0.4.0", 842 | "pocketmine/nbt": "^0.3.2", 843 | "pocketmine/raklib": "^0.14.2", 844 | "pocketmine/raklib-ipc": "^0.1.0", 845 | "pocketmine/snooze": "^0.3.0", 846 | "ramsey/uuid": "^4.1", 847 | "webmozart/path-util": "^2.3" 848 | }, 849 | "require-dev": { 850 | "phpstan/phpstan": "1.8.0", 851 | "phpstan/phpstan-phpunit": "^1.1.0", 852 | "phpstan/phpstan-strict-rules": "^1.2.0", 853 | "phpunit/phpunit": "^9.2" 854 | }, 855 | "default-branch": true, 856 | "type": "project", 857 | "autoload": { 858 | "files": [ 859 | "src/CoreConstants.php" 860 | ], 861 | "psr-4": { 862 | "pocketmine\\": "src/" 863 | } 864 | }, 865 | "notification-url": "https://packagist.org/downloads/", 866 | "license": [ 867 | "LGPL-3.0" 868 | ], 869 | "description": "A server software for Minecraft: Bedrock Edition written in PHP", 870 | "homepage": "https://pmmp.io", 871 | "support": { 872 | "issues": "https://github.com/pmmp/PocketMine-MP/issues", 873 | "source": "https://github.com/pmmp/PocketMine-MP/tree/stable" 874 | }, 875 | "funding": [ 876 | { 877 | "url": "https://github.com/pmmp/PocketMine-MP#donate", 878 | "type": "custom" 879 | }, 880 | { 881 | "url": "https://www.patreon.com/pocketminemp", 882 | "type": "patreon" 883 | } 884 | ], 885 | "time": "2022-07-04T14:15:17+00:00" 886 | }, 887 | { 888 | "name": "pocketmine/raklib", 889 | "version": "0.14.6", 890 | "source": { 891 | "type": "git", 892 | "url": "https://github.com/pmmp/RakLib.git", 893 | "reference": "aeca667d5ecc4cc18fded612f29e3511bbf62f42" 894 | }, 895 | "dist": { 896 | "type": "zip", 897 | "url": "https://api.github.com/repos/pmmp/RakLib/zipball/aeca667d5ecc4cc18fded612f29e3511bbf62f42", 898 | "reference": "aeca667d5ecc4cc18fded612f29e3511bbf62f42", 899 | "shasum": "" 900 | }, 901 | "require": { 902 | "ext-sockets": "*", 903 | "php": "^8.0", 904 | "php-64bit": "*", 905 | "php-ipv6": "*", 906 | "pocketmine/binaryutils": "^0.2.0", 907 | "pocketmine/log": "^0.3.0 || ^0.4.0" 908 | }, 909 | "require-dev": { 910 | "phpstan/phpstan": "1.9.17", 911 | "phpstan/phpstan-strict-rules": "^1.0" 912 | }, 913 | "type": "library", 914 | "autoload": { 915 | "psr-4": { 916 | "raklib\\": "src/" 917 | } 918 | }, 919 | "notification-url": "https://packagist.org/downloads/", 920 | "license": [ 921 | "GPL-3.0" 922 | ], 923 | "description": "A RakNet server implementation written in PHP", 924 | "support": { 925 | "issues": "https://github.com/pmmp/RakLib/issues", 926 | "source": "https://github.com/pmmp/RakLib/tree/0.14.6" 927 | }, 928 | "time": "2023-03-07T15:10:23+00:00" 929 | }, 930 | { 931 | "name": "pocketmine/raklib-ipc", 932 | "version": "0.1.1", 933 | "source": { 934 | "type": "git", 935 | "url": "https://github.com/pmmp/RakLibIpc.git", 936 | "reference": "922a6444b0c6c7daaa5aa5a832107e1ec4738aed" 937 | }, 938 | "dist": { 939 | "type": "zip", 940 | "url": "https://api.github.com/repos/pmmp/RakLibIpc/zipball/922a6444b0c6c7daaa5aa5a832107e1ec4738aed", 941 | "reference": "922a6444b0c6c7daaa5aa5a832107e1ec4738aed", 942 | "shasum": "" 943 | }, 944 | "require": { 945 | "php": "^7.4 || ^8.0", 946 | "php-64bit": "*", 947 | "pocketmine/binaryutils": "^0.2.0", 948 | "pocketmine/raklib": "^0.13.1 || ^0.14.0" 949 | }, 950 | "require-dev": { 951 | "phpstan/phpstan": "0.12.81", 952 | "phpstan/phpstan-strict-rules": "^0.12.2" 953 | }, 954 | "type": "library", 955 | "autoload": { 956 | "psr-4": { 957 | "raklib\\server\\ipc\\": "src/" 958 | } 959 | }, 960 | "notification-url": "https://packagist.org/downloads/", 961 | "license": [ 962 | "GPL-3.0" 963 | ], 964 | "description": "Channel-based protocols for inter-thread/inter-process communication with RakLib", 965 | "support": { 966 | "issues": "https://github.com/pmmp/RakLibIpc/issues", 967 | "source": "https://github.com/pmmp/RakLibIpc/tree/0.1.1" 968 | }, 969 | "time": "2021-09-22T17:01:12+00:00" 970 | }, 971 | { 972 | "name": "pocketmine/snooze", 973 | "version": "0.3.1", 974 | "source": { 975 | "type": "git", 976 | "url": "https://github.com/pmmp/Snooze.git", 977 | "reference": "0ac8fc2a781c419a1f64ebca4d5835028f59e29b" 978 | }, 979 | "dist": { 980 | "type": "zip", 981 | "url": "https://api.github.com/repos/pmmp/Snooze/zipball/0ac8fc2a781c419a1f64ebca4d5835028f59e29b", 982 | "reference": "0ac8fc2a781c419a1f64ebca4d5835028f59e29b", 983 | "shasum": "" 984 | }, 985 | "require": { 986 | "ext-pthreads": "~3.2.0 || ^4.0", 987 | "php-64bit": "^7.3 || ^8.0" 988 | }, 989 | "require-dev": { 990 | "phpstan/extension-installer": "^1.0", 991 | "phpstan/phpstan": "0.12.99", 992 | "phpstan/phpstan-strict-rules": "^0.12.4" 993 | }, 994 | "type": "library", 995 | "autoload": { 996 | "psr-4": { 997 | "pocketmine\\snooze\\": "src/" 998 | } 999 | }, 1000 | "notification-url": "https://packagist.org/downloads/", 1001 | "license": [ 1002 | "LGPL-3.0" 1003 | ], 1004 | "description": "Thread notification management library for code using the pthreads extension", 1005 | "support": { 1006 | "issues": "https://github.com/pmmp/Snooze/issues", 1007 | "source": "https://github.com/pmmp/Snooze/tree/0.3.1" 1008 | }, 1009 | "time": "2021-11-01T20:50:08+00:00" 1010 | }, 1011 | { 1012 | "name": "ramsey/collection", 1013 | "version": "1.2.2", 1014 | "source": { 1015 | "type": "git", 1016 | "url": "https://github.com/ramsey/collection.git", 1017 | "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" 1018 | }, 1019 | "dist": { 1020 | "type": "zip", 1021 | "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", 1022 | "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", 1023 | "shasum": "" 1024 | }, 1025 | "require": { 1026 | "php": "^7.3 || ^8", 1027 | "symfony/polyfill-php81": "^1.23" 1028 | }, 1029 | "require-dev": { 1030 | "captainhook/captainhook": "^5.3", 1031 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", 1032 | "ergebnis/composer-normalize": "^2.6", 1033 | "fakerphp/faker": "^1.5", 1034 | "hamcrest/hamcrest-php": "^2", 1035 | "jangregor/phpstan-prophecy": "^0.8", 1036 | "mockery/mockery": "^1.3", 1037 | "phpspec/prophecy-phpunit": "^2.0", 1038 | "phpstan/extension-installer": "^1", 1039 | "phpstan/phpstan": "^0.12.32", 1040 | "phpstan/phpstan-mockery": "^0.12.5", 1041 | "phpstan/phpstan-phpunit": "^0.12.11", 1042 | "phpunit/phpunit": "^8.5 || ^9", 1043 | "psy/psysh": "^0.10.4", 1044 | "slevomat/coding-standard": "^6.3", 1045 | "squizlabs/php_codesniffer": "^3.5", 1046 | "vimeo/psalm": "^4.4" 1047 | }, 1048 | "type": "library", 1049 | "autoload": { 1050 | "psr-4": { 1051 | "Ramsey\\Collection\\": "src/" 1052 | } 1053 | }, 1054 | "notification-url": "https://packagist.org/downloads/", 1055 | "license": [ 1056 | "MIT" 1057 | ], 1058 | "authors": [ 1059 | { 1060 | "name": "Ben Ramsey", 1061 | "email": "ben@benramsey.com", 1062 | "homepage": "https://benramsey.com" 1063 | } 1064 | ], 1065 | "description": "A PHP library for representing and manipulating collections.", 1066 | "keywords": [ 1067 | "array", 1068 | "collection", 1069 | "hash", 1070 | "map", 1071 | "queue", 1072 | "set" 1073 | ], 1074 | "support": { 1075 | "issues": "https://github.com/ramsey/collection/issues", 1076 | "source": "https://github.com/ramsey/collection/tree/1.2.2" 1077 | }, 1078 | "funding": [ 1079 | { 1080 | "url": "https://github.com/ramsey", 1081 | "type": "github" 1082 | }, 1083 | { 1084 | "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", 1085 | "type": "tidelift" 1086 | } 1087 | ], 1088 | "time": "2021-10-10T03:01:02+00:00" 1089 | }, 1090 | { 1091 | "name": "ramsey/uuid", 1092 | "version": "4.x-dev", 1093 | "source": { 1094 | "type": "git", 1095 | "url": "https://github.com/ramsey/uuid.git", 1096 | "reference": "418e9c633917184aa85dda4b5959620e6d97897a" 1097 | }, 1098 | "dist": { 1099 | "type": "zip", 1100 | "url": "https://api.github.com/repos/ramsey/uuid/zipball/418e9c633917184aa85dda4b5959620e6d97897a", 1101 | "reference": "418e9c633917184aa85dda4b5959620e6d97897a", 1102 | "shasum": "" 1103 | }, 1104 | "require": { 1105 | "brick/math": "^0.8 || ^0.9", 1106 | "ext-ctype": "*", 1107 | "ext-json": "*", 1108 | "php": "^8.0", 1109 | "ramsey/collection": "^1.0" 1110 | }, 1111 | "replace": { 1112 | "rhumsaa/uuid": "self.version" 1113 | }, 1114 | "require-dev": { 1115 | "captainhook/captainhook": "^5.10", 1116 | "captainhook/plugin-composer": "^5.3", 1117 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", 1118 | "doctrine/annotations": "^1.8", 1119 | "ergebnis/composer-normalize": "^2.15", 1120 | "mockery/mockery": "^1.3", 1121 | "moontoast/math": "^1.1", 1122 | "paragonie/random-lib": "^2", 1123 | "php-mock/php-mock": "^2.2", 1124 | "php-mock/php-mock-mockery": "^1.3", 1125 | "php-parallel-lint/php-parallel-lint": "^1.1", 1126 | "phpbench/phpbench": "^1.0", 1127 | "phpstan/extension-installer": "^1.0", 1128 | "phpstan/phpstan": "^0.12", 1129 | "phpstan/phpstan-mockery": "^0.12", 1130 | "phpstan/phpstan-phpunit": "^0.12", 1131 | "phpunit/phpunit": "^8.5 || ^9", 1132 | "slevomat/coding-standard": "^7.0", 1133 | "squizlabs/php_codesniffer": "^3.5", 1134 | "vimeo/psalm": "^4.9" 1135 | }, 1136 | "suggest": { 1137 | "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", 1138 | "ext-ctype": "Enables faster processing of character classification using ctype functions.", 1139 | "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", 1140 | "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", 1141 | "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", 1142 | "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." 1143 | }, 1144 | "default-branch": true, 1145 | "type": "library", 1146 | "extra": { 1147 | "captainhook": { 1148 | "force-install": true 1149 | } 1150 | }, 1151 | "autoload": { 1152 | "files": [ 1153 | "src/functions.php" 1154 | ], 1155 | "psr-4": { 1156 | "Ramsey\\Uuid\\": "src/" 1157 | } 1158 | }, 1159 | "notification-url": "https://packagist.org/downloads/", 1160 | "license": [ 1161 | "MIT" 1162 | ], 1163 | "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", 1164 | "keywords": [ 1165 | "guid", 1166 | "identifier", 1167 | "uuid" 1168 | ], 1169 | "support": { 1170 | "issues": "https://github.com/ramsey/uuid/issues", 1171 | "source": "https://github.com/ramsey/uuid/tree/4.x" 1172 | }, 1173 | "funding": [ 1174 | { 1175 | "url": "https://github.com/ramsey", 1176 | "type": "github" 1177 | }, 1178 | { 1179 | "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", 1180 | "type": "tidelift" 1181 | } 1182 | ], 1183 | "time": "2022-03-28T03:56:29+00:00" 1184 | }, 1185 | { 1186 | "name": "symfony/polyfill-php81", 1187 | "version": "dev-main", 1188 | "source": { 1189 | "type": "git", 1190 | "url": "https://github.com/symfony/polyfill-php81.git", 1191 | "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" 1192 | }, 1193 | "dist": { 1194 | "type": "zip", 1195 | "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", 1196 | "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", 1197 | "shasum": "" 1198 | }, 1199 | "require": { 1200 | "php": ">=7.1" 1201 | }, 1202 | "default-branch": true, 1203 | "type": "library", 1204 | "extra": { 1205 | "branch-alias": { 1206 | "dev-main": "1.26-dev" 1207 | }, 1208 | "thanks": { 1209 | "name": "symfony/polyfill", 1210 | "url": "https://github.com/symfony/polyfill" 1211 | } 1212 | }, 1213 | "autoload": { 1214 | "files": [ 1215 | "bootstrap.php" 1216 | ], 1217 | "psr-4": { 1218 | "Symfony\\Polyfill\\Php81\\": "" 1219 | }, 1220 | "classmap": [ 1221 | "Resources/stubs" 1222 | ] 1223 | }, 1224 | "notification-url": "https://packagist.org/downloads/", 1225 | "license": [ 1226 | "MIT" 1227 | ], 1228 | "authors": [ 1229 | { 1230 | "name": "Nicolas Grekas", 1231 | "email": "p@tchwork.com" 1232 | }, 1233 | { 1234 | "name": "Symfony Community", 1235 | "homepage": "https://symfony.com/contributors" 1236 | } 1237 | ], 1238 | "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", 1239 | "homepage": "https://symfony.com", 1240 | "keywords": [ 1241 | "compatibility", 1242 | "polyfill", 1243 | "portable", 1244 | "shim" 1245 | ], 1246 | "support": { 1247 | "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" 1248 | }, 1249 | "funding": [ 1250 | { 1251 | "url": "https://symfony.com/sponsor", 1252 | "type": "custom" 1253 | }, 1254 | { 1255 | "url": "https://github.com/fabpot", 1256 | "type": "github" 1257 | }, 1258 | { 1259 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1260 | "type": "tidelift" 1261 | } 1262 | ], 1263 | "time": "2022-05-24T11:49:31+00:00" 1264 | }, 1265 | { 1266 | "name": "webmozart/assert", 1267 | "version": "1.11.0", 1268 | "source": { 1269 | "type": "git", 1270 | "url": "https://github.com/webmozarts/assert.git", 1271 | "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" 1272 | }, 1273 | "dist": { 1274 | "type": "zip", 1275 | "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", 1276 | "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", 1277 | "shasum": "" 1278 | }, 1279 | "require": { 1280 | "ext-ctype": "*", 1281 | "php": "^7.2 || ^8.0" 1282 | }, 1283 | "conflict": { 1284 | "phpstan/phpstan": "<0.12.20", 1285 | "vimeo/psalm": "<4.6.1 || 4.6.2" 1286 | }, 1287 | "require-dev": { 1288 | "phpunit/phpunit": "^8.5.13" 1289 | }, 1290 | "type": "library", 1291 | "extra": { 1292 | "branch-alias": { 1293 | "dev-master": "1.10-dev" 1294 | } 1295 | }, 1296 | "autoload": { 1297 | "psr-4": { 1298 | "Webmozart\\Assert\\": "src/" 1299 | } 1300 | }, 1301 | "notification-url": "https://packagist.org/downloads/", 1302 | "license": [ 1303 | "MIT" 1304 | ], 1305 | "authors": [ 1306 | { 1307 | "name": "Bernhard Schussek", 1308 | "email": "bschussek@gmail.com" 1309 | } 1310 | ], 1311 | "description": "Assertions to validate method input/output with nice error messages.", 1312 | "keywords": [ 1313 | "assert", 1314 | "check", 1315 | "validate" 1316 | ], 1317 | "support": { 1318 | "issues": "https://github.com/webmozarts/assert/issues", 1319 | "source": "https://github.com/webmozarts/assert/tree/1.11.0" 1320 | }, 1321 | "time": "2022-06-03T18:03:27+00:00" 1322 | }, 1323 | { 1324 | "name": "webmozart/path-util", 1325 | "version": "2.3.0", 1326 | "source": { 1327 | "type": "git", 1328 | "url": "https://github.com/webmozart/path-util.git", 1329 | "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" 1330 | }, 1331 | "dist": { 1332 | "type": "zip", 1333 | "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", 1334 | "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", 1335 | "shasum": "" 1336 | }, 1337 | "require": { 1338 | "php": ">=5.3.3", 1339 | "webmozart/assert": "~1.0" 1340 | }, 1341 | "require-dev": { 1342 | "phpunit/phpunit": "^4.6", 1343 | "sebastian/version": "^1.0.1" 1344 | }, 1345 | "type": "library", 1346 | "extra": { 1347 | "branch-alias": { 1348 | "dev-master": "2.3-dev" 1349 | } 1350 | }, 1351 | "autoload": { 1352 | "psr-4": { 1353 | "Webmozart\\PathUtil\\": "src/" 1354 | } 1355 | }, 1356 | "notification-url": "https://packagist.org/downloads/", 1357 | "license": [ 1358 | "MIT" 1359 | ], 1360 | "authors": [ 1361 | { 1362 | "name": "Bernhard Schussek", 1363 | "email": "bschussek@gmail.com" 1364 | } 1365 | ], 1366 | "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", 1367 | "support": { 1368 | "issues": "https://github.com/webmozart/path-util/issues", 1369 | "source": "https://github.com/webmozart/path-util/tree/2.3.0" 1370 | }, 1371 | "abandoned": "symfony/filesystem", 1372 | "time": "2015-12-17T08:42:14+00:00" 1373 | } 1374 | ], 1375 | "aliases": [], 1376 | "minimum-stability": "dev", 1377 | "stability-flags": { 1378 | "pocketmine/pocketmine-mp": 20 1379 | }, 1380 | "prefer-stable": false, 1381 | "prefer-lowest": false, 1382 | "platform": { 1383 | "php": "^8.0" 1384 | }, 1385 | "platform-dev": [], 1386 | "plugin-api-version": "2.6.0" 1387 | } 1388 | -------------------------------------------------------------------------------- /phpstan.neon.dist: -------------------------------------------------------------------------------- 1 | parameters: 2 | level: 6 3 | checkMissingIterableValueType: false 4 | paths: 5 | - . 6 | excludePaths: 7 | analyse: 8 | - bin 9 | - vendor --------------------------------------------------------------------------------