From 6521ccd425971b183146ff0f47576e52e9ac091c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Sun, 27 Feb 2022 10:06:52 +0100 Subject: [PATCH 01/36] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 7e79eac6..7abd1024 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # mailcow: dockerized - 🐼 + 🐋 = 💕 + +## We stand with đŸ‡ș🇩 + [![master build status](https://img.shields.io/drone/build/mailcow/mailcow-dockerized/master?label=master%20build&server=https%3A%2F%2Fdrone.mailcow.email)](https://drone.mailcow.email/mailcow/mailcow-dockerized) [![staging build status](https://img.shields.io/drone/build/mailcow/mailcow-dockerized/staging?label=staging%20build&server=https%3A%2F%2Fdrone.mailcow.email)](https://drone.mailcow.email/mailcow/mailcow-dockerized) [![Translation status](https://translate.mailcow.email/widgets/mailcow-dockerized/-/translation/svg-badge.svg)](https://translate.mailcow.email/engage/mailcow-dockerized/) [![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/mailcow_email.svg?style=social&label=Follow%20%40mailcow_email)](https://twitter.com/mailcow_email) From b1314bd9a3f7b03188f34ba327a813e50b98370b Mon Sep 17 00:00:00 2001 From: Michael Gerdemann Date: Wed, 2 Mar 2022 11:17:08 +0100 Subject: [PATCH 02/36] [dovecot] Fix delayed quarantine notification (#4470) Fixes: #4469 --- data/Dockerfiles/dovecot/quarantine_notify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/Dockerfiles/dovecot/quarantine_notify.py b/data/Dockerfiles/dovecot/quarantine_notify.py index acd887a0..f60a3226 100755 --- a/data/Dockerfiles/dovecot/quarantine_notify.py +++ b/data/Dockerfiles/dovecot/quarantine_notify.py @@ -161,7 +161,7 @@ try: attrs = json.loads(attrs.decode('utf-8')) if attrs['quarantine_notification'] not in ('hourly', 'daily', 'weekly'): continue - if last_notification == 0 or (last_notification + time_trans[attrs['quarantine_notification']]) < time_now: + if last_notification == 0 or (last_notification + time_trans[attrs['quarantine_notification']]) <= time_now: print("Notifying %s: Considering %d new items in quarantine (policy: %s)" % (record['rcpt'], record['counter'], attrs['quarantine_notification'])) notify_rcpt(record['rcpt'], record['counter'], record['quarantine_acl'], attrs['quarantine_category']) From c520f21d286fde8eb0d67788528860eb6b392793 Mon Sep 17 00:00:00 2001 From: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com> Date: Wed, 2 Mar 2022 16:32:17 +0100 Subject: [PATCH 03/36] =?UTF-8?q?=F0=9F=90=84=20Moorch=20Update=202022=20-?= =?UTF-8?q?=20ClamAV,=20Dovecot=20&=20Olefy=20Update=20(#4497)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [API] Fix minor issue in api docs * [GH-Actions][stale] Add neverstale label to exempt list * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag * [Web] add github version tag error handling * [Web] add github version tag error handling * Passwordless SOGo auth: support for calendar invitations and calendar/contacts subscriptions Inviting someone to a calendar event triggers a request to /SOGo/so/otheruser@example.com/freebusy.ifb/ajaxRead. Subscribing to someone's calendar/contacts triggers a request to /SOGo/so/otheruser@example.com/foldersSearch. The email address in the URL is different from the logged-in user, which needs to be handled appropriately by sogo-auth.php. * [Web] add github version tag - adjust css * [Compose] Update SOGo Autoreply Schedule to 5m Based on the advice of inverse (SOGo developer). Thanks to https://github.com/jmber Closes: https://github.com/mailcow/mailcow-dockerized/issues/4436 * [Web] add github version tag - move twig globals * [Web] add github version tag - missing * Passwordless SOGo auth: improvements for when accessing other users * [WebAuthn] fido2 passwordless auth - fix (#4440) * [WebAuthn] fido2 revert * [WebAuthn] set UV flags to 'discouraged' * [WebAuthn] revert - set UV flags to 'discouraged' * Update clamav to 0.104.2 * Update clamav to 0.104.2 * Update dovecot to 2.3.18 Update gosu to 1.14 Use debian bullseye as base * [Web] Updated lang.es.json [CI SKIP] (#4453) Co-authored-by: Fijxu Co-authored-by: milkmaker Co-authored-by: Fijxu * Fix broken documentation links (#4458) * Fix broken documentation links * Fix a few more broken documentation links * Fix broken documentation links in translation files * Fall back to empty string if WATCHDOG_NOTIFY_EMAIL undefined (#4457) By default, `.env` (`mailcow.conf`) does not define `WATCHDOG_NOTIFY_EMAIL`. Using it in `docker-compose.yml` without having it defined leads to Compose v2 displaying this warning on startup: > WARNING: The WATCHDOG_NOTIFY_EMAIL variable is not set. Defaulting to a blank string. Related to https://github.com/mailcow/mailcow-dockerized/issues/4315 * [Web] Updated lang.sk.json [CI SKIP] (#4461) Co-authored-by: LukĂĄĆĄ Matula Co-authored-by: milkmaker Co-authored-by: LukĂĄĆĄ Matula * oletools: disable template injection detection (#4464) Seems to be causing a lot of false positives lately * Fix minor typo in comment (#4466) Correction of the comment, so that the explanation is correct and can be understood. * Update issue templates to issue forms (#4465) This PR updates the issue templates to GitHubs new issue forms * [Web] Fix padding issue in UI admin panel (#4481) * [Web] fix admin panel padding issue * [Web] fix admin panel padding issue * [Web] Updated lang.sk.json [CI SKIP] (#4489) Co-authored-by: LukĂĄĆĄ Matula Co-authored-by: milkmaker Co-authored-by: LukĂĄĆĄ Matula * increase opcache.interned_strings_buffer to 16 (#4487) since version 23.0.2 Nextcloud recommends having a value greater than 8 for `opcache.interned_strings_buffer`. As this memory will be only used when needed this should have no impact on installations that are not using nextcloud. related discussion: https://help.nextcloud.com/t/nextcloud-23-02-opcache-interned-strings-buffer/134007/19 related nextcloud issue: https://github.com/nextcloud/server/issues/31223 * nextcloud - add missing redirections (#4366) adds missing location directives to the nginx configuration of nextcloud 22, to prevent warnings in nextcloud admin center of missing redirections * Update imapsync to 2.178 (#4491) * Update and fix oletools (#4479) As noticed by @MAGICCC (#4464 (comment)), our olefy image does not work anymore if you rebuild it. This is because @HeinleinSupport recently updated their repository with the changes from @decalage2's repository, which renamed olvba3 to olevba. Since @HeinleinSupport does not recommend using its own patched branch and is very slow in pulling in changes from upstream (@decalage2), let's switch to the latter. This also allowed me to revert #4464. Finally, a minor patch to rspamd is necessary. While the documentation says In the extended mode the oletools module will not trigger on specific categories, but will always set a threat string with all found flags when at least a macro was found. This is not actually true -- it only sets it when suspicious or autoexec threats were detected. But it's a one-line patch to make rspamd behave as documented and we should submit that patch to @rspamd too. With this patch, I have confirmed that Mailcow will reject any incoming, non-whitelisted message containing attachments with macros. * [Web] Fix excluded domain list in quaratine view Previously excluded domains from quarantine were not shown. * [Dovecot] Update syslogng Version to 3.28 (#4496) Co-authored-by: Niklas Meyer Co-authored-by: ntimo Co-authored-by: Peter Co-authored-by: FreddleSpl0it Co-authored-by: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com> Co-authored-by: Michael Kuron Co-authored-by: milkmaker Co-authored-by: Fijxu Co-authored-by: Slavi Pantaleev Co-authored-by: LukĂĄĆĄ Matula Co-authored-by: Max Co-authored-by: Michael Cramer Co-authored-by: Robert Christian Co-authored-by: AndrĂ© Co-authored-by: Niklas Meyer --- .github/ISSUE_TEMPLATE/Bug_report.md | 140 +- .github/ISSUE_TEMPLATE/Feature_request.md | 47 +- data/Dockerfiles/clamd/Dockerfile | 78 +- data/Dockerfiles/clamd/tini | Bin 24064 -> 0 bytes data/Dockerfiles/dovecot/Dockerfile | 8 +- data/Dockerfiles/dovecot/imapsync | 1528 +++++++++++++---- .../dovecot/syslog-ng-redis_slave.conf | 2 +- data/Dockerfiles/dovecot/syslog-ng.conf | 2 +- data/Dockerfiles/olefy/Dockerfile | 4 +- data/Dockerfiles/rspamd/Dockerfile | 3 +- data/assets/nextcloud/nextcloud.conf | 8 + .../phpfpm/php-conf.d/opcache-recommended.ini | 2 +- data/web/lang/lang.cs.json | 2 +- data/web/lang/lang.da.json | 2 +- data/web/lang/lang.de.json | 2 +- data/web/lang/lang.en.json | 2 +- data/web/lang/lang.es.json | 3 +- data/web/lang/lang.fr.json | 2 +- data/web/lang/lang.it.json | 2 +- data/web/lang/lang.nl.json | 2 +- data/web/lang/lang.ro.json | 2 +- data/web/lang/lang.ru.json | 2 +- data/web/lang/lang.sk.json | 24 +- data/web/lang/lang.sv.json | 2 +- .../templates/admin/tab-config-admins.twig | 281 +-- .../admin/tab-config-quarantine.twig | 2 +- data/web/templates/user/tab-user-auth.twig | 2 +- docker-compose.yml | 12 +- generate_config.sh | 8 +- update.sh | 4 +- 30 files changed, 1537 insertions(+), 641 deletions(-) delete mode 100755 data/Dockerfiles/clamd/tini diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index 6e39c4c2..fee623be 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -1,60 +1,94 @@ ---- name: 🐞 Bug Report -about: Report a reproducible bug for mailcow. (NOT to be used for support questions.) -labels: bug ---- +description: Report a reproducible bug for mailcow. (NOT to be used for support questions.) +labels: ["bug"] +body: + - type: checkboxes + attributes: + label: Contribution guidelines + description: Please read the contribution guidelines before proceeding. + options: + - label: I've read the [contribution guidelines](https://github.com/mailcow/mailcow-dockerized/blob/master/CONTRIBUTING.md) and wholeheartedly agree + required: true + - type: checkboxes + attributes: + label: I've found a bug and checked that ... + description: Prior to placing the issue, please check following:** *(fill out each checkbox with an `X` once done)* + options: + - label: ... I understand that not following the below instructions will result in immediate closure and/or deletion of my issue. + required: true + - label: ... I have understood that this bug report is dedicated for bugs, and not for support-related inquiries. + required: true + - label: ... I have understood that answers are voluntary and community-driven, and not commercial support. + required: true + - label: ... I have verified that my issue has not been already answered in the past. I also checked previous [issues](https://github.com/mailcow/mailcow-dockerized/issues). + required: true + - type: textarea + attributes: + label: Description + description: Please provide a brief description of the bug in 1-2 sentences. If applicable, add screenshots to help explain your problem. Very useful for bugs in mailcow UI. + validations: + required: true + - type: textarea + attributes: + label: Logs + description: Please take a look at the [official documentation](https://mailcow.github.io/mailcow-dockerized-docs/debug-logs/) and post the last few lines of logs, when the error occurs. For example, docker container logs of affected containers. This will be automatically formatted into code, so no need for backticks. + render: bash + validations: + required: true + - type: textarea + attributes: + label: Steps to reproduce + description: Please describe the steps to reproduce the bug. Screenshots can be added, if helpful. + placeholder: |- + 1. ... + 2. ... + 3. ... + validations: + required: true + - type: textarea + attributes: + label: System information + description: In this stage we would kindly ask you to attach general system information about your setup. + value: |- + | Question | Answer | + | --- | --- | + | My operating system | I_DO_REPLY_HERE | + | Is Apparmor, SELinux or similar active? | I_DO_REPLY_HERE | + | Virtualization technlogy (KVM, VMware, Xen, etc - **LXC and OpenVZ are not supported** | I_DO_REPLY_HERE | + | Server/VM specifications (Memory, CPU Cores) | I_DO_REPLY_HERE | + | Docker Version (`docker version`) | I_DO_REPLY_HERE | + | Docker-Compose Version (`docker-compose version`) | I_DO_REPLY_HERE | + | Reverse proxy (custom solution) | I_DO_REPLY_HERE | - + Output of `git diff origin/master`, any other changes to the code? If so, **please post them**: + ``` + YOUR OUTPUT GOES HERE + ``` -**Prior to placing the issue, please check following:** *(fill out each checkbox with an `X` once done)* -- [ ] I understand that not following or deleting the below instructions will result in immediate closure and/or deletion of my issue. -- [ ] I have understood that this bug report is dedicated for bugs, and not for support-related inquiries. -- [ ] I have understood that answers are voluntary and community-driven, and not commercial support. -- [ ] I have verified that my issue has not been already answered in the past. I also checked previous [issues](https://github.com/mailcow/mailcow-dockerized/issues). + All third-party firewalls and custom iptables rules are unsupported. **Please check the Docker docs about how to use Docker with your own ruleset**. Nevertheless, iptabels output can help us to help you: + iptables -L -vn: + ``` + YOUR OUTPUT GOES HERE + ``` -## Summary - + iptables -L -vn -t nat: + ``` + YOUR OUTPUT GOES HERE + ``` -## Logs - + ip6tables -L -vn -t nat: + ``` + YOUR OUTPUT GOES HERE + ``` -## Reproduction - - -## System information - - -| Question | Answer | -| --- | --- | -| My operating system | I_DO_REPLY_HERE | -| Is Apparmor, SELinux or similar active? | I_DO_REPLY_HERE | -| Virtualization technlogy (KVM, VMware, Xen, etc - **LXC and OpenVZ are not supported** | I_DO_REPLY_HERE | -| Server/VM specifications (Memory, CPU Cores) | I_DO_REPLY_HERE | -| Docker Version (`docker version`) | I_DO_REPLY_HERE | -| Docker-Compose Version (`docker-compose version`) | I_DO_REPLY_HERE | -| Reverse proxy (custom solution) | I_DO_REPLY_HERE | - -- Output of `git diff origin/master`, any other changes to the code? If so, **please post them**. -- All third-party firewalls and custom iptables rules are unsupported. *Please check the Docker docs about how to use Docker with your own ruleset*. Nevertheless, iptabels output can help us to help you: `iptables -L -vn`, `ip6tables -L -vn`, `iptables -L -vn -t nat` and `ip6tables -L -vn -t nat`. -- DNS problems? Please run `docker exec -it $(docker ps -qf name=acme-mailcow) dig +short stackoverflow.com @172.22.1.254` (set the IP accordingly, if you changed the internal mailcow network) and post the output. + DNS problems? Please run `docker exec -it $(docker ps -qf name=acme-mailcow) dig +short stackoverflow.com @172.22.1.254` (set the IP accordingly, if you changed the internal mailcow network) and post the output: + ``` + YOUR OUTPUT GOES HERE + ``` + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md index 64ff9d3a..39414f1b 100644 --- a/.github/ISSUE_TEMPLATE/Feature_request.md +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -1,29 +1,20 @@ ---- name: 💡 Feature Request -about: Suggest an idea for mailcow. -labels: enhancement ---- - - - -## Summary - -A clear and concise description of what the problem is. -For example: I'm always frustrated when [...] - -## Motivation - -What are you about to solve or improve with this idea? -What would be the benefit for most users? - -## Additional context - -Add any other context or screenshots about the feature request. +description: Suggest an idea for mailcow. +labels: ["enhancement"] +body: + - type: textarea + attributes: + label: Summary + description: Please describe your idea in a reasonable amount of detail. + validations: + required: true + - type: textarea + attributes: + label: Motivation + description: Please describe how your idea would benefit you and other users. + validations: + required: true + - type: textarea + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request. diff --git a/data/Dockerfiles/clamd/Dockerfile b/data/Dockerfiles/clamd/Dockerfile index 6f38e359..3f1aa157 100644 --- a/data/Dockerfiles/clamd/Dockerfile +++ b/data/Dockerfiles/clamd/Dockerfile @@ -2,18 +2,26 @@ FROM debian:bullseye-slim LABEL maintainer "AndrĂ© Peters " -ARG CLAMAV=0.103.5 +ARG CLAMAV=0.104.2 +ARG TINI_VERSION=v0.19.0 + RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ - zlib1g-dev \ - libcurl4-openssl-dev \ - libncurses5-dev \ - libzip-dev \ - libpcre2-dev \ - libxml2-dev \ - libssl-dev \ build-essential \ + pkg-config \ + python3 \ + python3-pip \ + valgrind \ + check \ + libbz2-dev \ + libcurl4-openssl-dev \ libjson-c-dev \ + libmilter-dev \ + libncurses5-dev \ + libpcre2-dev \ + libssl-dev \ + libxml2-dev \ + zlib1g-dev \ curl \ bash \ wget \ @@ -22,39 +30,47 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ rsync \ dos2unix \ netcat \ + && python3 -m pip install cmake \ && rm -rf /var/lib/apt/lists/* \ && wget -O - https://www.clamav.net/downloads/production/clamav-${CLAMAV}.tar.gz | tar xfvz - \ && cd clamav-${CLAMAV} \ - && ./configure \ - --prefix=/usr \ - --libdir=/usr/lib \ - --sysconfdir=/etc/clamav \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --disable-llvm \ - --with-user=clamav \ - --with-group=clamav \ - --with-dbdir=/var/lib/clamav \ - --enable-clamdtop \ - --enable-bigstack \ - --with-pcre \ - && make -j4 \ - && make install \ - && make clean \ + && cmake . \ + -D CMAKE_INSTALL_PREFIX=/usr \ + -D CMAKE_INSTALL_LIBDIR=/usr/lib \ + -D APP_CONFIG_DIRECTORY=/etc/clamav \ + -D CMAKE_INSTALL_MANDIR=/usr/share/man \ + -D CMAKE_INSTALL_INFODIR=/usr/share/info \ + -D CLAMAV_USER=clamav \ + -D CLAMAV_GROUP=clamav \ + -D DATABASE_DIRECTORY=/var/lib/clamav \ + -D ENABLE_APP=ON \ + -D ENABLE_JSON_SHARED=OFF \ + -D CMAKE_BUILD_TYPE=MinSizeRel \ + && cmake --build . -j4 \ + && cmake --build . --target install \ && cd .. && rm -rf clamav-${CLAMAV} \ && apt-get -y --auto-remove purge build-essential \ - && apt-get -y purge zlib1g-dev \ - libncurses5-dev \ - libzip-dev \ - libpcre2-dev \ - libxml2-dev \ - libssl-dev \ + && apt-get -y purge pkg-config \ + python3 \ + python3-pip \ + valgrind \ + check \ + libbz2-dev \ + libcurl4-openssl-dev \ libjson-c-dev \ + libmilter-dev \ + libncurses5-dev \ + libpcre2-dev \ + libssl-dev \ + libxml2-dev \ + zlib1g-dev \ + && addgroup --system --gid 700 clamav \ && adduser --system --no-create-home --home /var/lib/clamav --uid 700 --gid 700 --disabled-login clamav \ && rm -rf /tmp/* /var/tmp/* COPY clamd.sh ./ -COPY tini /sbin/tini +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini +RUN chmod +x /sbin/tini CMD ["/sbin/tini", "-g", "--", "/clamd.sh"] diff --git a/data/Dockerfiles/clamd/tini b/data/Dockerfiles/clamd/tini deleted file mode 100755 index 03af82f09e6484df819313cf9fec158d6b4a879d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24064 zcmeHve|!|xx%VU_2mv+$L8H=o!q#N{<`HuEer$$? zd~V;*{k(s?pAVy(GtckmJm)#joS8Yy?VhHF+?*Uu9l6?-8bMtPT^uF;YTD#_4oY0L zHd}LPpU@U-Gl9v+&&4U!iZj(7m#S4eOY+S?n}=U@u0T}hy7-A|7Yj5jh(mcuE!mqo zT=G=3^;Zc{wVK8_g5=28qGk@F?cyh@{qz|UuN;(e8<=IQ5Nw zKG{ECt_u*sE^4%T{&%V+UOHO;VD{4a_B9+t>*6P>eNdn^)hfAbAV+@wy+@H`Y?Jn; zi^~z&Kh;W5yL2$ny=vv9gT3X0fnan~`KIbs<*QaYBO&K<-fz-Ryp7Er+>(kT14KSA z#E)`-=+#ejZ`!o*WzSbP?R~eg=<(m)z4kNf=YzHcKjNjB7EKhfbvbvZFZvBThpZ}9Xf4*w`=G*VTZTXY$FL-SH&yF8Ge%%YJzEvJOaLaXz_udlU`>$(X zpG>~~<=dWm{)^wdl_rbRx`R4lz=B>GRPU$D^T6~>mP?HY%_i@ys_LAhWW zd?|u|D*oPS_&dPQPNDzBY4|Cgr_ygtga6Vr`21=7TssZ_U#7udHx2&mY4jhMroZ*m z=%IW%Re#&2!Bak+ihs^D_(Rj+*);y&I}QIYros1M0y5CDk0=nQ@^kMr_-{;u|F3EA zw@rhen8u&KO~X&ufm8YUV;&!e#+JIkp=m3imyYFV7ibQxYmtk?6h}I?Nc^F5TpWH$ z;xFTR3bng05qM6-pV{D_ubrd0uIb{awN#LBERc357PvV4jMTFT(0uJ&?K>S^9530m z^SIqP+NL5G$E!b^q@E+^3p~w3I_{PDt|cx4wIt-}xDag-^e3c#fz`CNl7B+#*&qoY z06!lR+hxC$KNmOXXzi^IMAucrM9_#(tdlkt&g ztwrjYl>Eh#@I8qiJIlo}{|tFLZjpMj`}JLE_u<7Z&i6dz>G&yr6z5492f9YkQ7-u> zWPc^QHY)A5Uf|+<1=4N;EsgI=>A#B4e96zG9)nA1+H+FBS|8E1hK`5vBYz&w^5;Ln z&rT7a&rAO8S^SpN-zxiiEh)#bQTbEs;_wf_#}8bGd+4&eN{g7`NT5IHAJjs_W+2$B z^@YMWYd{T$Lp?+O2tV%&3=T#NQ|mX(;Xto;Ge8nFLxWn6e{e9=qYa09OyC0j#?Y|2 znRq)pjc_;^>IBtq20}p+h6&*NhQooN+1J@K0Oe+HC~9hb!%?$GGkYL7+#ep+cneFA zF@huHnm^o6%+N_zdJXQ6vB~He8P@tn!vWJEyuXK=8ubUbqrjMfA)}XIa=2#*s?9Kz zgu-xyqR<(EYO{059|&sQ{)iFu4;j3lY0ib^<6qJ4H)cn1@ zoyMkNqsJta8I8cn7M%75f}PQb(W|W6`-m=LkPKu(XJ>aLA{B>?h#9guM&5Vc8XD>j z81RzD6VdE3f)NbEuzxhDbzVKv*(O6#H|UQ6;e7^{x@}|Ff^B^&ehozj!G3_b8P>e2-zug zZl}_@fN5TdbE<9PFwY6hrWNZBI6=7Rxdi8GPm)tOj<K)vYXx;YY{Q?WkZ5<< z@MqiblQz7%wi0=-4S%kUf1eG1o(;d>hFAC6L_TE0f5OIZ+3=sV;g8tx%!WU1!(U*- z>#?_H>52U4RZP>jPMZ1FQDmtzrqrP{j-@vc zOsSvR$Kf`DDdkg>9KM=hO7+yk9IhppQarVt!)pkpX_cDb@N$AF)l*{}zL;Q2@zgMf zmk>;;o$BK7xdc;6r&>9@fM81Hl#9a!1XBv9Dma`=Fr{vaarlEP0aMDRia7i(!IY{g zjl*veOeH0Cn&9w{2&NQFjdA#U1XJpzhB^FAf+^)vT^zojU@QR9e-3|{U`oA|i^HEMm{KlP z!QsymOsSS)91hnot#1M_KlD4^+J?c?$D2wP>f^qW;yv{xJT7P#(kNRWAlAs3xd|Zj zJDw!&-IbHpZiE!*Gj+#=6 zw6CNB;P{r3N#Yv6t;D6r>r0q*CE~tyGWz{Q)z4~~w)L2K<4*2FA3TS#R_o^FB9`O?j%C`5SX_RQrozjszRSr z!M`AShknO9T*0o7XF!1-KcerluF`X!)}Q^@T$Ir^M`&c7%uPgJ0NHU z5#xdpW8`O&oVeZdI4}nz@0_7Yb5VC0BnHqF|?Ys7Fc9l9$d=GxH}L< zYc9x%YHKUbldel$Ncmmhei1cCCFTtv>4~b{K#Acx2O@mdY}nm5VIBT}>wggBEd3Xd z{(l7-`j?XaBBB5A1Biq5h>#mRSuO?rmMP@k#(8o;$fbG^srJfam1*lCpb?gB?@$lD z04me*r>$0wjqf%?RuyTF?@nm3mc{AYGua2_n_tQKdF4RJ}s0IJ*x*lgrs!^$cXn(aGw0B=thc4 zgOVrz`d7oh!aEy)w#tOMr!cdj&hBG3cVyo8K}phzQ}{SRK3*n#oB&A#VJ5Vsj$z7A zxI5fFZ~UWx;@J5tTBBF@A zRbrX^Z)O_cPlg45xq!a&3v&zwu|KR#8xV-VnWUj53AM^fK^@Ah=`EzKD?@wJuHG$Vd zDDxuzbg>xUUT>-a zI}TM-V!UHjLp$cr%lfX@^AcaNfQ>Ku8ETA}intPCp4lcJt{PMM1{=jmTGY_8W0sCp z8@~&*7E-XVNST$Sva4e$wRG%CEz0zoG~m%t76BiM_Ib$sYxus^gS?&Ie$Jb!c~uKc$lG`L0yT}e60dEC53n1NE7EqVeI{t+?f4-aZjO00k^dFYz?HIY zfD#1!OyO{y?VfCccV!+Gq~tQpEaB_+%iycQNmaiENyK0!X`xE0?jvRhwOGBjBQ}K5iSw1;WIJjEQGSB>$k3X{oZzddI!q-QkTNbNlf3qjucg z@1qc$1>apPCj-foyT82s^i(fr}@QKLrq0t)h+2OsD7NLqPbr)Kk&~(xf+R-rCem`plN3i@L&V~kU#&2ItV@KE z-(%iq%}+lxS#Q0?$JM}jax3&>RN>O2;8xXYjWGBvpoGD{LWEnAR&561-{YV{gL$&O zKMPN8AWAA3v?cCuIHk&!G4WMWa;iQ}SQ~`?g(vI(60}&0K}Pkx2j|K4qCcrikbP>s zV4WxA|2L{iRy?lZUd&5^Vhj2MP?EY6lUn3Ydy-w#rC|vjdvZ*VzhS+6SgtA(h<{>b zN$lhK=FPF1-(NzvV4r&kS6Kg{bu}EoL~gfkA<=3)kU%MYit=F$ z2!w9+$*w(0y}I1mi6*&eB_E~3oqXLDtJy3}y$%g@cl6d6-K%QWnWRkIA?KNI#E#D~ zU$f2^2KJ+rWc9s67`TxPlnMjzgzAw>gB2j5On)6Hkp}O+2?WfEq*HYyk^kn!RHzEK zgs5Qu8!;tn`h-P$v3i~RGOr1gB$Yu?tXg5)+QCUxl^Ii?gBDzU&nJx=gvR%rybty| z^(CS4B~X$@8IAieepa8*xDzDde3f**a+0D&^JIq5`}LFcu7)t~9IbB%j$6S&weK}3 zR>3(-=zW3Vs4OkJs4Dbc;PIN78wZHp*&*a5mJ>DE!=Oa0O{!gljX_m~wq-ecz%iEg6C<#UhFw^-=2U8k+D zK}fAL{)sE7IaVgd=sQR!HAZ2f`yfc7pOvKXr2c&PNACCCV8bBW{jTH+=G_X4&F?du z@O!4v-I>w-0%@`7&ODE_{!!>(DfHX(_gT@ybBThxNa$6r|CCdzw2b-@C_y4@eIMzS zz?0zkzSyDL3%7oeC(FP^SRIaBV^s=E&!9e_C-#Rg{m@tVXj92N4AA#MPVTeC>1tu@ zE5M65&4wN_Quyf8@h9BzypmlX2=$L-)X#>h)C@k6 zU7Gt^tYG44y4`FVU;5i63=fyb%c;c^v18u&3r)-ZK=;-9u8(F|7ySWU-TJo4Di5l7 zG{xU+iXW?ohV;Uh`Azrg!_ha9D)OP0`$l)?Zrl3t=x&;H&<75jYV;m@LxbDrZerNe z5n!cD1IsotwX1^l`2&MS?;5r=qHU=6)OIwUz?IpBVdtY=A$FK{UO?WC+Td+&XkjO) z0z>K2$g%>hE;KZRy$cN6J`F}2O+vxQnt}q2vGTz+tbHIf3KHKwz=+M*6fm6ynkP6C z2#110M$lv<{&0Y{QgAV!x7pj--cj4;akqNfG!Cx!wAHq>dwtgnaILqgsk61MrOwmd z-r3mJ($R|8H|l80%SR0CdBKj9rI7-yIbJkwDPP90t|Ff!Ud zXskgTeQoYK&k3DZyB~~R=8rJGfq_l!``B=;yRG@eXkpWb+-Q>t>qSc=7ftPVv7rMT zt@h~H2;gtv!^_MN!!8nR+F6jC(9)r`89hc|1df8UPH(E$TCrgx5bS4SAIciW z{b&x!UO+S7QDaBY-VW%&o|az8H5xDn7`6+MG~D%IOrdg(qz)h^G|bq90;Aq$A2ru> zczKJlBM>p=qvoz{NEEBM?^ZR-g3c|=>+ zB8;{BTDW#!yN|aWZH>fsU0rJjZyVZgpmsfGkq|^SH4x@nZ*!eaC+*j_^YVp$)9x4w zm>g!leTUKZsS}4ru-o{dg@%R=AngZ@a2EHJUe4FjF%93zQ#Kf4rn#AwhHj=jpgb{* z-euDK)JCg}J@7}OJp-)Q7{NT8POhD{_GAW_YmG#BaxgX8Vz8wlUVP+iV-?QIYG(y2 zXZ@JmeMZlURn;pbUkB|1qAA5TwBU7LOLO~1hG;jox!1Asa<;+U)(FgPIG4&$I_U7A z3Pnu=6Bxeqhy6n=8pIAPW)2wW4z^c~1ZbkOP+w+_)AlA24|vXt6I7uLDb2DPDW`4K z2=>4?AQ{YoK!gn#gTrjdh>-jC!Uev_8m0;WO@HoT4>+ev04og}w?qTjS;d-YH$1zt zhGApVG88_@4>JsTv%6^x^MwQb{pgf{+30`~WY~2^MX?vVugaL=?02#yLV_m65@-+y z^o*=wjYiN2V-pn{qGEuab%!FT!ch~O?ws&)7<<`RbeIxl1u7W&qZB}XbPa2z?Oo^r zcAW(&$At%!Qnag!!4-ymdNjEi-{IA(#Hk;c@a@=4CM!vVjL_)td2&%CGZOvbP;}TX zXE4uoUSDTjOTC98IpiOnLa@@laA=5Ckh0}fRm-TYAYq0S`k%#}yC?bB7#N++{MsXG2yOb4g;#5B>umQR7`nHq ze(Ji%kb%*le+1>8u8a(c&a-kDJLYf=8*(x?hGugp%A&lO+p~;bmT0yMg4%p{ic1y0 z)N%F``2DKRXRc|?Z<^siHzuSK=?IG5hbS3*&m{{4DG@SzGFAWTXm=m-D}wq1y*$C> zHb=@TaTS6KC+Ryir&6nVXrm|8VY$PvSfq@u?zk#tVoN<+huxpDbc<^e!*z2AV}lCH z3!B(I$!i-G(UbWFmni#EL;!T<%+%eJ<;a_8@aAA>G)R*tf>j9)c^wt|D>HLMmDrl4 z0b;^2l}Ff=N>flVeR3H+(2qd{b7t@npqU7R5?M-$T z+`u>Zssu!>AH~jZuC?2Mbh$`3h@$|L%`z4VF`2b=Dd1O&5Sbdq{e!c>7h-*ZO}x0` zf{mIrREFAQa71}Tt-moPD4pptfqm5{-2t!@SN~*Nb%Z-{%D$8_XhkS896T1zQ^bx? zkCwSO1y54=(Tv+{I%qcz9UT&$AwX@Tg!3faD`9%zOvj*v=|MCdriAG!H65RpFg=^5 zG)8>iv_6VUFzaz=Sw)}ycw6%voY@Pi|O4(v>*V5@j1fxBU_F=RYNPwc>;dUMEk>7(4Z7Xiy_o96m4*-s! zoy3!YVkE{Go|sLbox~&2y#(XUhYR+Ppxq`DMa3`Y);29?Q&G-&bI+JHk#j~7;i+%O z_overqgBVL`8BNs48%X{1>v*iC~9yNUtKt7bk>-5)w!2nyrN_Y=^(y({I(+o41Lnv zj-ps@ZexLCmOdwUBbqv%Qlx7Tzxxm){%>sr-@Tj<_$K`B!ms${bejL0l3GX6cy6tu z_^uiC4t8gr+ff?JzuHle8!m8^x*g2zCKKR+J6Nu(z)=hg z^fb(=cN8~dRFb|=L2eV|t|dA2BDc*ki*%U4PXf>X4UxxD^o3lHqj-Eqt%Kc_SMMmj zGr!(Z5u2HNjp!+2AbMIqC-)wpU^atloYR_xsh1O&?7vL?L2hjj_KR}YJ7&>%y$Adl z@ciF+HPU!_#c+KV4Ue82f8^ed*VAeKZcO`ixy%1;7<~N# zjobJP5A_G*Ci~Oq7|WfZ=M*?98u$oiI?*sEw+C2oVq7y=&m0OsHgBz}Pc$w+gIx=A zg#TMRo=n5Bv@I?Fp&g!UhKFGZXxg&Vm$p1|l{Jo3v;!eu5SY88C z?9l=TtK;K}{A!$&yE_X;!cEcF3Xdqin=mK$KA%oMgZOHVj*0vrBIOoznj?dtS7YuP zIM-nJixj6XP@Kl|Y8|C_ew0U9ImjV+RdYayvRg_|9j;hLr)j7;^r={iSFa+Q1riioDLCuU#^Rq%s1aAXA4+8 zf1Q{iVD&t8pS(F&&nwh3CG|X$bkTuZd2zIM@mAf_)At?dpyxPrsOP%sdFSLj*9mxC z!piSWoQm%T$yV9NhEm?2V#%MDu!<)hC35=2T%liz|37ckckHqaJz6CEcv`kE%JvP} z9+U0N`GW5(*-H)MNEwlfz<`?9@I zwyR{@Alvn_?UU_@Y_t2F4Xg1{c!JmFDG1;5!>f&TULW53i#<=J0G1UL)P;sO<7NMV z$x3^cvE>z&Rm?XK!Y&fl5)R$k6Jl4G9CU>^=f$;)x@>j@_P@jp{ z{bExC_5y`^0(eQ?%X&jSQQD5hzvzQ^IoOZIO6f(-l6EPvWEnSt_qc-v0eT^g?MF%( zy}-n_1H7)mM|cAKQ$1yPCEPO@#RqAyuRxLq14996fy8-4A_edquZqgJpJmv}&>QI6 zjMm`Y8jf}k1|kDx*bzah=^ZrQMG=w*xQt$UUCQ4p4GtEdr`R_^QL%f+c_==J4eZMh z@eK>3i24b&*v} zzdJO7T@aZ8$D2CZcSGAv#5??{QI({~0NzJ4ymu1;gWW)|fKaMCcxx8z#*6Bp8SoFX z;ZT^{%kHMLpunelSbIx@4?EC2%-c>oZPt71J@ssfyB+Y7GIp)kr?+(Y7&zM8&A#hd zO9OK^U(eQho9oN452LjWyXsg=TY-07Ym?Ul9JWL?b<}&C8(A&nnp=?DUL-Y?`dSzn zl&ZWQ$ThHap0+w2n%%YDCT!U&D`@cgnn`CvOB-{uR(G4vTi4O#Zey(-ZLKZs9+-BBe_UB`IOH;iE$XX9P zbJsR`gei2YuF36PSH|ky>)egxT^nnGmbL<76W+0Fbq}G)o*Vzy(H14@25lw7zCT|X zdfDd7h+gY$_mnYro41_;($LnjuB?E<2?=P2638`sgcb@l4^U=Az(N7*K&O>2tlr~p zf-VeC^9jS}ENHB&Tf<5_x}!le%Bq|zofYM)q8zIHOyw$P#Y*SuWdctHWmUzhiq)Ft zj0|9!nEr0fiLE^bzI5e8mKjcTxZL#jOQ=5>b#_OwGow7vt2qh6ro92p*}FLy**qj# zGb|`_ztjmpCum_~&`$#LYH!^^$bMwYuLKeQ+&84`-&LW>&e zyOLMyng-yARmrRM*`!mpIW?*S8q~z85XF@J8w@5kl{$25@mfo?^+DgG{ zeN`+Mq!m&=+kc7HZo&!0RLQILoG#@zNk(NqyZ@$?ua$gieK;xQ)q0ZTDQ4O7^yvYL zi41dQJ-w+2NE~XNEFj^lI;VCses=loa$UAv${)%KxI|~ZYew<4%a1K^0fYCH3wV?9 zS3pz#D|j3yc6s$Z%n2!XTzmg@d?jP>HL~y8ewBpas|F21THGb+lm)oWM z2_ItvFH?$S`wg_@e@1?di&ND1mmlQN)SqnoKLE)tuV3!s%=+a*=5LuB4FRk17ZAQn zgcI7!q1e>@lKLKVHh(t!6l4o+^6Gx7m?jpEZ2oNcS@4km%07MGh7R_3%D)I+%3UR| z?kCjuviFg494fz+eU%5>K(pId-_bkX!o{ZbU+H-@OI~a35`wLw;mYMHHA+sk7I1d^ z+BIFohVPk*CXqGZOrSG=-@zH_QvFxo`%82PmNC&}{<6%OI5~=j>{n#rl|0pV`ys=b W>DCFp+ZcCB`+u|H=v2uo^#1{xm}Ef! diff --git a/data/Dockerfiles/dovecot/Dockerfile b/data/Dockerfiles/dovecot/Dockerfile index ee30eec8..4a914904 100644 --- a/data/Dockerfiles/dovecot/Dockerfile +++ b/data/Dockerfiles/dovecot/Dockerfile @@ -1,10 +1,10 @@ -FROM debian:buster-slim +FROM debian:bullseye-slim LABEL maintainer "Andre Peters " ARG DEBIAN_FRONTEND=noninteractive -ARG DOVECOT=2.3.17.1 +ARG DOVECOT=2.3.18 ENV LC_ALL C -ENV GOSU_VERSION 1.12 +ENV GOSU_VERSION 1.14 # Add groups and users before installing Dovecot to not break compatibility RUN groupadd -g 5000 vmail \ @@ -89,7 +89,7 @@ RUN groupadd -g 5000 vmail \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ && apt-key adv --fetch-keys https://repo.dovecot.org/DOVECOT-REPO-GPG \ - && echo "deb https://repo.dovecot.org/ce-${DOVECOT}/debian/buster buster main" > /etc/apt/sources.list.d/dovecot.list \ + && echo "deb https://repo.dovecot.org/ce-${DOVECOT}/debian/bullseye bullseye main" > /etc/apt/sources.list.d/dovecot.list \ && apt-get update \ && apt-get -y --no-install-recommends install \ dovecot-lua \ diff --git a/data/Dockerfiles/dovecot/imapsync b/data/Dockerfiles/dovecot/imapsync index 07cf58e7..0d34504e 100755 --- a/data/Dockerfiles/dovecot/imapsync +++ b/data/Dockerfiles/dovecot/imapsync @@ -1,6 +1,6 @@ #!/usr/bin/env perl -# $Id: imapsync,v 2.148 2021/07/22 14:21:09 gilles Exp gilles $ +# $Id: imapsync,v 2.178 2022/01/12 21:28:37 gilles Exp gilles $ # structure # pod documentation # use pragmas @@ -25,7 +25,7 @@ and without duplicates. =head1 VERSION -This documentation refers to Imapsync $Revision: 2.148 $ +This documentation refers to Imapsync $Revision: 2.178 $ =head1 USAGE @@ -212,16 +212,6 @@ Same thing for user2 password. --sslargs2 str : Pass any ssl parameter for host2 ssl or tls connection. See --sslargs1 - --timeout1 flo : Connection timeout in seconds for host1. - Default is 120 and 0 means no timeout at all. - --timeout2 flo : Connection timeout in seconds for host2. - Default is 120 and 0 means no timeout at all. - - Caveat, under CGI context, you may encounter a timeout - from the webserver, killing imapsync and the imap connexions. - See the document INSTALL.OnlineUI.txt and search - for "Timeout" for how to deal with this issue. - =head2 OPTIONS/authentication @@ -243,7 +233,7 @@ Same thing for user2 password. --domain2 str : Domain on host2 (NTLM authentication). --oauthaccesstoken1 str : The access token to authenticate with OAUTH2. - It will be combined with the --user1 value to form the + It will be combined with the --user1 value to form the string to pass with XOAUTH2 authentication. The password given by --password1 or --passfile1 is ignored. @@ -252,18 +242,18 @@ Same thing for user2 password. If the value is a file, imapsync reads its first line and take this line as the access token. The advantage of the file is that if the access token changes then - imapsync can read it again when it needs to reconnect + imapsync can read it again when it needs to reconnect during a run. - --oauthaccesstoken2 str : same thing as --oauthaccesstoken1 + --oauthaccesstoken2 str : same thing as --oauthaccesstoken1 --oauthdirect1 str : The direct string to pass with XOAUTH2 authentication. - The password given by --password1 or --passfile1 and + The password given by --password1 or --passfile1 and the user given by --user1 are ignored. --oauthdirect2 str : same thing as oauthdirect1 - + =head2 OPTIONS/folders @@ -432,6 +422,12 @@ and user1 user2 are the --user1 --user2 values. by spaces. --regexmess reg : and this one, etc. + --truncmess int : truncates messages when their size exceed the int + value, specified in bytes. Good to sync too big + messages or to "suppress" attachments. + Have in mind that this way, messages become + uncoherent somehow. + =head2 OPTIONS/labels Gmail present labels as folders in imap. Imapsync can accelerate the sync @@ -639,7 +635,27 @@ https://imapsync.lamiral.info/FAQ.d/FAQ.Gmail.txt =head2 OPTIONS/behavior - --maxmessagespersecond flo : limits the average number of messages + --timeout1 flo : Connection timeout in seconds for host1. + Default is 120 and 0 means no timeout at all. + --timeout2 flo : Connection timeout in seconds for host2. + Default is 120 and 0 means no timeout at all. + + Caveat, under CGI context, you may encounter a timeout + from the webserver, killing imapsync and the imap connexions. + See the document INSTALL.OnlineUI.txt and search + for "Timeout" for how to deal with this issue. + + --keepalive1 : https://metacpan.org/pod/Mail::IMAPClient#Keepalive + Some firewalls and network gears like to timeout connections + prematurely if the connection sits idle. + This option enables SO_KEEPALIVE on the host1 socket. + --keepalive1 is on by default since imapsync release 2.169 + Use --nokeepalive1 to disable it. + + --keepalive2 : Same as --keepalive2 but for host2. + Use --nokeepalive2 to disable it. + + --maxmessagespersecond flo : limits the average number of messages transferred per second. --maxbytespersecond int : limits the average transfer rate per second. @@ -946,6 +962,7 @@ use strict ; use warnings ; use Carp ; use Cwd ; +use Compress::Zlib ; use Data::Dumper ; use Digest::HMAC_SHA1 qw( hmac_sha1 hmac_sha1_hex ) ; use Digest::MD5 qw( md5 md5_hex md5_base64 ) ; @@ -1033,6 +1050,7 @@ Readonly my $EXIT_ERR_SELECT => 117 ; Readonly my $EXIT_TRANSFER_EXCEEDED => 118 ; Readonly my $EXIT_ERR_APPEND_VIRUS => 119 ; +Readonly my $EXIT_ERR_FLAGS => 120 ; Readonly my $EXIT_TESTS_FAILED => 254 ; # Like Test::More API @@ -1063,6 +1081,7 @@ Readonly my %EXIT_TXT => ( $EXIT_ERR_APPEND => 'EXIT_ERR_APPEND', $EXIT_ERR_APPEND_VIRUS => 'EXIT_ERR_APPEND_VIRUS', $EXIT_ERR_FETCH => 'EXIT_ERR_FETCH', + $EXIT_ERR_FLAGS => 'EXIT_ERR_FLAGS', $EXIT_ERR_CREATE => 'EXIT_ERR_CREATE', $EXIT_ERR_SELECT => 'EXIT_ERR_SELECT', $EXIT_TESTS_FAILED => 'EXIT_TESTS_FAILED', @@ -1082,6 +1101,7 @@ Readonly my %EXIT_VALUE_OF_ERR_TYPE => ( ERR_CREATE => $EXIT_ERR_CREATE, ERR_SELECT => $EXIT_ERR_SELECT, ERR_Host1_FETCH => $EXIT_ERR_FETCH, + ERR_FLAGS => $EXIT_ERR_FLAGS, ERR_UNCLASSIFIED => $EXIT_WITH_ERRORS, ERR_NOTHING_REPORTED => $EXIT_WITH_ERRORS, ERR_TRANSFER_EXCEEDED => $EXIT_TRANSFER_EXCEEDED, @@ -1093,6 +1113,103 @@ Readonly my %EXIT_VALUE_OF_ERR_TYPE => ( ) ; + +Readonly my %COMMENT_OF_ERR_TYPE => ( + ERR_APPEND_SIZE => \&comment_err_append_size, + ERR_OVERQUOTA => \&comment_err_overquota, + ERR_APPEND => \&comment_err_blank, + ERR_APPEND_VIRUS => \&comment_err_blank, + ERR_CREATE => \&comment_err_blank, + ERR_SELECT => \&comment_err_blank, + ERR_Host1_FETCH => \&comment_err_blank, + ERR_FLAGS => \&comment_err_flags, + ERR_UNCLASSIFIED => \&comment_err_blank, + ERR_NOTHING_REPORTED => \&comment_err_blank, + ERR_TRANSFER_EXCEEDED => \&comment_err_transfer_exceeded, + ERR_CONNECTION_FAILURE_HOST1 => \&comment_err_connection_failure_host1, + ERR_CONNECTION_FAILURE_HOST2 => \&comment_err_connection_failure_host2, + ERR_AUTHENTICATION_FAILURE_USER1 => \&comment_err_authentication_failure_host1, + ERR_AUTHENTICATION_FAILURE_USER2 => \&comment_err_authentication_failure_host2, + ERR_EXIT_TLS_FAILURE => \&comment_err_blank, +) ; + + +sub comment_err_blank +{ + return '' ; +} + + +sub comment_err_append_size +{ + my $mysync = shift @ARG ; + + my $comment = "The destination server refuses too big messages. Use --truncmess option. Read https://imapsync.lamiral.info/FAQ.d/FAQ.Messages_Too_Big.txt" ; + return $comment ; +} + + +sub comment_err_authentication_failure_host1 +{ + my $mysync = shift @ARG ; + + my $comment = "Check the credentials for $mysync->{ user1 }." ; + return $comment ; +} + +sub comment_err_authentication_failure_host2 +{ + my $mysync = shift @ARG ; + + my $comment = "Check the credentials for $mysync->{ user2 }." ; + return $comment ; +} + + +sub comment_err_connection_failure_host1 +{ + my $mysync = shift @ARG ; + + my $comment = "Check that host1 $mysync->{ host1 } on port $mysync->{ port1 } is the right IMAP server to be contacted for your mailbox." ; + return $comment ; +} + +sub comment_err_connection_failure_host2 +{ + my $mysync = shift @ARG ; + + my $comment = "Check that host1 $mysync->{ host2 } on port $mysync->{ port2 } is the right IMAP server to be contacted for your mailbox." ; + return $comment ; +} + +sub comment_err_overquota +{ + my $mysync = shift @ARG ; + + my $comment = 'The destination mailbox is 100% full, get free space on it and then resume the sync.' ; + return $comment ; +} + + +sub comment_err_transfer_exceeded +{ + my $mysync = shift @ARG ; + + my $size_limit_human = bytes_display_string_dec( $mysync->{ exitwhenover } ) ; + my $comment = "The maximum transfer size for a single sync is reached ( over $size_limit_human ). Relaunch the sync to sync more." ; + return $comment ; +} + +sub comment_err_flags +{ + my $mysync = shift @ARG ; + + my $comment = 'Many STORE errors with FLAGS. Retry with the option --noresyncflags' ; + return $comment ; +} + + + Readonly my $DEFAULT_LOGDIR => 'LOG_imapsync' ; Readonly my $ERRORS_MAX => 50 ; # exit after 50 errors. @@ -1177,9 +1294,8 @@ Readonly my $FORCE => 1 ; my( $sync, $acc1, $acc2, - $debugcontent, $debugflags, + $debugflags, $debuglist, $debugdev, $debugmaxlinelength, $debugcgi, - @include, @exclude, @folderrec, @folderfirst, @folderlast, @h1_folders_all, %h1_folders_all, @@ -1191,41 +1307,26 @@ my( %h1_subscribed_folder, %h2_subscribed_folder, %h2_folders_from_1_wanted, %h2_folders_from_1_several, - $prefix1, $prefix2, @regexmess, @skipmess, @pipemess, $pipemesscheck, $syncflagsaftercopy, $syncinternaldates, $idatefromheader, - $minsize, $maxage, $minage, $search, @useheader, %useheader, $skipsize, $allowsizemismatch, $buffersize, - - $authmd5, $authmd51, $authmd52, $subscribed, $subscribe, $subscribeall, $help, - - $fast, - $nb_msg_skipped_dry_mode, - $h2_nb_msg_noheader, - $h1_bytes_processed, - $h1_nb_msg_end, $h1_bytes_end, $h2_nb_msg_end, $h2_bytes_end, - $timestart_int, - $uid1, $uid2, - - $split1, $split2, - $modulesversion, $delete2folders, $delete2foldersonly, $delete2foldersbutnot, $usecache, $debugcache, $cacheaftercopy, @@ -1244,7 +1345,6 @@ my( $cgidir, %month_abrev, $SSL_VERIFY_POLICY, - $warn_release, ) ; single_sync( $sync, $acc1, $acc2 ); @@ -1263,7 +1363,7 @@ sub single_sync # or $acc1->{variable_name} # or $acc1->{variable_name} -# +# $acc1 = {} ; $acc2 = {} ; $sync->{ acc1 } = $acc1 ; @@ -1271,10 +1371,12 @@ $sync->{ acc2 } = $acc2 ; $acc1->{ Side } = 'Host1' ; $acc2->{ Side } = 'Host2' ; +$acc1->{ N } = '1' ; +$acc2->{ N } = '2' ; $sync->{timestart} = time ; # Is a float because of use Time::HiRres -$sync->{rcs} = q{$Id: imapsync,v 2.148 2021/07/22 14:21:09 gilles Exp gilles $} ; +$sync->{rcs} = q{$Id: imapsync,v 2.178 2022/01/12 21:28:37 gilles Exp gilles $} ; $sync->{ memory_consumption_at_start } = memory_consumption( ) || 0 ; @@ -1383,6 +1485,8 @@ after_get_options( $sync, $options_good ) ; # Under CGI environment, fix caveat emptor potential issues cgisetcontext( $sync ) ; +get_options_extra( $sync ) ; + # --gmail --gmail --exchange --office etc. easyany( $sync ) ; @@ -1397,7 +1501,7 @@ my $unittestssuite = unittestssuite( $sync ) ; if ( condition_to_leave_after_tests( $sync ) ) { - return $unittestssuite ; + return $unittestssuite ; } # init live varaiables @@ -1458,7 +1562,7 @@ myprint( 'Effective user id is ' . getpwuid_any_os( $EFFECTIVE_USER_ID ). " (eui $modulesversion = defined $modulesversion ? $modulesversion : 1 ; -$warn_release = ( $sync->{releasecheck} ) ? check_last_release( ) : $STR_use_releasecheck ; +$sync->{ warn_release } = ( $sync->{ releasecheck } ) ? check_last_release( ) : $STR_use_releasecheck ; $wholeheaderifneeded = defined $wholeheaderifneeded ? $wholeheaderifneeded : 1; @@ -1557,7 +1661,7 @@ check_lib_version( $sync ) or -if ( $sync->{ justbanner } ) +if ( $sync->{ justbanner } ) { myprint( "Exiting because of --justbanner\n" ) ; exit_clean( $sync, $EX_OK ) ; @@ -1766,6 +1870,11 @@ myprint( "Host1: imap connection timeout is $sync->{ acc1 }->{timeout} seconds\n $sync->{ acc2 }->{timeout} = defined $sync->{ acc2 }->{timeout} ? $sync->{ acc2 }->{timeout} : $sync->{ timeout } ; myprint( "Host2: imap connection timeout is $sync->{ acc2 }->{timeout} seconds\n" ) ; + +keepalive1( $sync ) ; +keepalive2( $sync ) ; + + if ( under_cgi_context( $sync ) ) { myprint( "Under CGI context, a timeout can occur from the webserver, see https://imapsync.lamiral.info/INSTALL.d/INSTALL.OnlineUI.txt\n" ) ; @@ -1773,7 +1882,7 @@ if ( under_cgi_context( $sync ) ) $sync->{ syncacls } = defined $sync->{ syncacls } ? $sync->{ syncacls } : 0 ; -# No folders sizes if --justfolders, unless really wanted. +# No folders sizes at the beginning if --justfolders, unless really wanted. if ( $sync->{ justfolders } and not defined $sync->{ foldersizes } @@ -1786,7 +1895,8 @@ if ( $sync->{ foldersizes } = ( defined $sync->{ foldersizes } ) ? $sync->{ foldersizes } : 1 ; $sync->{ foldersizesatend } = ( defined $sync->{ foldersizesatend } ) ? $sync->{ foldersizesatend } : $sync->{ foldersizes } ; -$sync->{ checknoabletosearch } = ( defined $sync->{ checknoabletosearch } ) ? $sync->{ checknoabletosearch } : 1 ; +#$sync->{ checknoabletosearch } = ( defined $sync->{ checknoabletosearch } ) ? $sync->{ checknoabletosearch } : 1 ; +set_checknoabletosearch( $sync ) ; $acc1->{ fastio } = defined $acc1->{ fastio } ? $acc1->{ fastio } : 0 ; @@ -1796,6 +1906,11 @@ $acc2->{ fastio } = defined $acc2->{ fastio } ? $acc2->{ fastio } : 0 ; $acc1->{ reconnectretry } = defined $acc1->{ reconnectretry } ? $acc1->{ reconnectretry } : $DEFAULT_NB_RECONNECT_PER_IMAP_COMMAND ; $acc2->{ reconnectretry } = defined $acc2->{ reconnectretry } ? $acc2->{ reconnectretry } : $DEFAULT_NB_RECONNECT_PER_IMAP_COMMAND ; +# IMAP compression on by default +#$acc1->{ compress } = defined $acc1->{ compress } ? $acc1->{ compress } : 0 ; +#$acc2->{ compress } = defined $acc2->{ compress } ? $acc2->{ compress } : 0 ; + + if ( ! @useheader ) { @useheader = qw( Message-Id Received ) ; } @@ -1936,6 +2051,9 @@ quota( $sync, $sync->{imap2}, 'h2' ) ; maxsize_setting( $sync ) ; +acc_compress_imap( $acc1 ) ; +acc_compress_imap( $acc2 ) ; + if ( $sync->{ justlogin } ) { $sync->{imap1}->logout( ) ; $sync->{imap2}->logout( ) ; @@ -2330,7 +2448,7 @@ FOLDER: foreach my $h1_fold ( @{ $sync->{h1_folders_wanted} } ) my $h2_fold_nb_messages = count_from_select( @select_results ) ; myprint( "Host2: folder [$h2_fold] has $h2_fold_nb_messages messages in total (mentioned by SELECT)\n" ) ; - my $permanentflags2 = permanentflags( @select_results ) ; + my $permanentflags2 = permanentflags( $sync, @select_results ) ; myprint( "Host2: folder [$h2_fold] permanentflags: $permanentflags2\n" ) ; if ( $sync->{ expunge1 } ) @@ -2874,22 +2992,21 @@ if ( ! lost_connection( $sync, $sync->{imap2}, "for host2 [$sync->{host2}]" ) ) do_and_print_stats( $sync ) ; -if ( $sync->{errorsdump} and $sync->{nb_errors} ) +if ( $sync->{ nb_errors } ) { myprint( errors_listing( $sync ) ) ; } -if ( $sync->{testslive} or $sync->{testslive6} ) +if ( $sync->{ testslive } or $sync->{ testslive6 } ) { - tests_live_result( $sync->{nb_errors} ) ; + tests_live_result( $sync->{ nb_errors } ) ; } - -if ( $sync->{nb_errors} ) +if ( $sync->{ nb_errors } ) { - my $exit_value = $EXIT_VALUE_OF_ERR_TYPE{ $sync->{most_common_error} } || $EXIT_CATCH_ALL ; + my $exit_value = exit_value( $sync, $sync->{ most_common_error } ) ; exit_clean( $sync, $exit_value ) ; } else @@ -3020,16 +3137,16 @@ sub tests_print_output_if_needed output( $mysync, "Hello\n" ) ; is( "Hello\n", print_output_if_needed( $mysync ), 'print_output_if_needed: Hello => Hello' ) ; - + $mysync->{ dockercontext } = 1 ; is( "Hello\n", print_output_if_needed( $mysync ), 'print_output_if_needed: dockercontext + Hello => Hello' ) ; - + $mysync->{ version } = 1 ; is( q{}, print_output_if_needed( $mysync ), 'print_output_if_needed: dockercontext + Hello + --version => ""' ) ; - + $mysync->{ dockercontext } = 0 ; is( "Hello\n", print_output_if_needed( $mysync ), 'print_output_if_needed: Hello + --version => Hello' ) ; - + note( 'Leaving tests_print_output_if_needed()' ) ; return ; } @@ -3037,11 +3154,11 @@ sub tests_print_output_if_needed sub print_output_if_needed { - + my $mysync = shift @ARG ; if ( ! defined $mysync ) { return ; } my $output = output( $mysync ) ; - + if ( $mysync->{ version } && under_docker_context( $mysync ) ) { return q{} ; @@ -3051,7 +3168,7 @@ sub print_output_if_needed myprint( $output ) ; return $output ; } - + } @@ -3415,7 +3532,7 @@ sub tests_under_docker_context sub under_docker_context { my $mysync = shift ; - + if ( ! defined $mysync ) { return ; } if ( defined $mysync->{ dockercontext } ) @@ -3436,7 +3553,7 @@ sub under_docker_context } -sub docker_context +sub docker_context { my $mysync = shift ; @@ -3447,7 +3564,7 @@ sub docker_context output( $mysync, "Docker context detected with the file /.dockerenv\n" ) ; # No pidfile by default - + $mysync->{ pidfile } = defined( $mysync->{ pidfile } ) ? $mysync->{ pidfile } : q{} ; # No log by default if ( defined( $mysync->{ log } ) ) @@ -3461,8 +3578,11 @@ sub docker_context } # In case something is written relatively to . - output( $mysync, "Changing current directory to /var/tmp/\n" ) ; - chdir '/var/tmp/' ; + my $tmp_dir = "/var/tmp/uid_$EFFECTIVE_USER_ID" ; + mkpath( $tmp_dir ) ; # silly? No. it is for imapsync --version being ok. + do_valid_directory( $tmp_dir ) ; + output( $mysync, "Changing current directory to $tmp_dir\n" ) ; + chdir $tmp_dir ; return ; } @@ -3520,7 +3640,7 @@ sub under_cgi_context return ; } -sub cgibuildheader +sub cgibuildheader { my $mysync = shift ; if ( ! under_cgi_context( $mysync ) ) { return ; } @@ -3689,15 +3809,15 @@ sub cgisetcontext if ( ! under_cgi_context( $mysync ) ) { return ; } output( $mysync, "Under cgi context\n" ) ; - - + + set_umask( $mysync ) ; # Remove all content in unsafe evaled options @{ $mysync->{ regextrans2 } } = ( ) ; @{ $mysync->{ regexflag } } = buggyflagsregex( ) ; - + @regexmess = ( ) ; @skipmess = ( ) ; @pipemess = ( ) ; @@ -3738,7 +3858,7 @@ sub cgisetcontext -d $cgidir or mkpath $cgidir or die "Can not create $cgidir: $OS_ERROR\n" ; $mysync->{ tmpdir } = $cgidir ; $mysync->{ logdir } = '' ; - + chdir $cgidir or die "Can not cd to $cgidir: $OS_ERROR\n" ; cgioutputenvcontext( $mysync ) ; $mysync->{ debug } and output( $mysync, 'Current directory is ' . getcwd( ) . "\n" ) ; @@ -3758,7 +3878,7 @@ sub cgisetcontext # addheader on by default $mysync->{ addheader } = defined $mysync->{ addheader } ? $mysync->{ addheader } : 1 ; - + # sync duplicates by default in cgi context $mysync->{ syncduplicates } = defined $mysync->{ syncduplicates } ? $mysync->{ syncduplicates } : 1 ; @@ -3780,7 +3900,7 @@ sub cgioutputenvcontext return ; } -sub announcelogfile +sub announcelogfile { my $mysync = shift ; @@ -3792,7 +3912,7 @@ sub announcelogfile else { myprint( "No log file because of option --nolog\n" ) ; - } + } return ; } @@ -3802,7 +3922,7 @@ sub loglogfile my $mysync = shift ; if ( ! $mysync->{ loglogfile } ) { return ; } if ( ! $mysync->{ log } ) { return ; } - + my $cwd = getcwd( ) ; my $absolutelogfilepath ; # Fixme: add case when the logfile name is already absolute @@ -3822,10 +3942,10 @@ sub loglogfile } -sub checkselectable +sub checkselectable { - my $mysync = shift ; - + my $mysync = shift ; + if ( $mysync->{ checkselectable } ) { my @h1_folders_wanted_selectable ; myprint( "Host1: Checking wanted folders are selectable. Use --nocheckselectable to avoid this check.\n" ) ; @@ -3842,7 +3962,7 @@ sub checkselectable } } @{ $mysync->{ h1_folders_wanted } } = @h1_folders_wanted_selectable ; - ( $mysync->{ debug } or $mysync->{ debugfolders } ) + ( $mysync->{ debug } or $mysync->{ debugfolders } ) and myprint( 'Host1: checking folders took ', timenext( $mysync ), " s\n" ) ; } else @@ -3852,14 +3972,14 @@ sub checkselectable return ; } -sub setcheckselectable +sub setcheckselectable { my $mysync = shift ; - + my $h1_folders_wanted_nb = scalar @{ $mysync->{ h1_folders_wanted } } ; # 152 because 98% of host1 accounts have less than 152 folders on /X service. - # command to get this value: - # datamash_file_op_index G_Host1_Nb_folders.txt perc:98 4 %16.1f + # command to get this value: + # datamash_file_op_index G_Host1_Nb_folders.txt perc:98 4 %16.1f if ( ! defined $mysync->{ checkselectable } ) { if ( 152 >= $h1_folders_wanted_nb ) @@ -4014,8 +4134,8 @@ sub foldersizes } myprintf( "%s Nb folders: %11s folders\n", $side, $nb_folders ) ; myprintf( "%s Nb messages: %11s messages\n", $side, $total_nb ) ; - myprintf( "%s Total size: %11s bytes (%s)\n", $side, $total_size, bytes_display_string( $total_size ) ) ; - myprintf( "%s Biggest message: %11s bytes (%s)\n", $side, $biggest_in_all, bytes_display_string( $biggest_in_all ) ) ; + myprintf( "%s Total size: %11s bytes (%s)\n", $side, $total_size, bytes_display_string_bin( $total_size ) ) ; + myprintf( "%s Biggest message: %11s bytes (%s)\n", $side, $biggest_in_all, bytes_display_string_bin( $biggest_in_all ) ) ; myprintf( "%s Time spent on sizing: %11.1f seconds\n", $side, timenext( $mysync ) ) ; return( $total_nb, $total_size ) ; } @@ -4319,11 +4439,11 @@ sub foldersizes_total myprintf( "Host1 Nb messages: %11s messages\n", $total_nb_1 ) ; myprintf( "Host2 Nb messages: %11s messages\n", $total_nb_2 ) ; myprint( "\n" ) ; - myprintf( "Host1 Total size: %11s bytes (%s)\n", $total_size_1, bytes_display_string( $total_size_1 ) ) ; - myprintf( "Host2 Total size: %11s bytes (%s)\n", $total_size_2, bytes_display_string( $total_size_2 ) ) ; + myprintf( "Host1 Total size: %11s bytes (%s)\n", $total_size_1, bytes_display_string_bin( $total_size_1 ) ) ; + myprintf( "Host2 Total size: %11s bytes (%s)\n", $total_size_2, bytes_display_string_bin( $total_size_2 ) ) ; myprint( "\n" ) ; - myprintf( "Host1 Biggest message: %11s bytes (%s)\n", $biggest_in_all_1, bytes_display_string( $biggest_in_all_1 ) ) ; - myprintf( "Host2 Biggest message: %11s bytes (%s)\n", $biggest_in_all_2, bytes_display_string( $biggest_in_all_2 ) ) ; + myprintf( "Host1 Biggest message: %11s bytes (%s)\n", $biggest_in_all_1, bytes_display_string_bin( $biggest_in_all_1 ) ) ; + myprintf( "Host2 Biggest message: %11s bytes (%s)\n", $biggest_in_all_2, bytes_display_string_bin( $biggest_in_all_2 ) ) ; myprint( "\n" ) ; myprintf( "Time spent on sizing: %11.1f seconds\n", timenext( $mysync ) ) ; @@ -5326,7 +5446,7 @@ sub imapsync_id vendor => 'Gilles LAMIRAL', 'support-url' => 'https://imapsync.lamiral.info/', # Example of date-time: 19-Sep-2015 08:56:07 - date => date_from_rcs( q{$Date: 2021/07/22 14:21:09 $ } ), + date => date_from_rcs( q{$Date: 2022/01/12 21:28:37 $ } ), } ; my $imapsync_id_github = { @@ -5335,7 +5455,7 @@ sub imapsync_id os => $OSNAME, vendor => 'github', 'support-url' => 'https://github.com/imapsync/imapsync', - date => date_from_rcs( q{$Date: 2021/07/22 14:21:09 $ } ), + date => date_from_rcs( q{$Date: 2022/01/12 21:28:37 $ } ), } ; $imapsync_id = $imapsync_id_lamiral ; @@ -5412,11 +5532,13 @@ sub quota my $Side = $side{ $side } ; my $debug_before = $imap->Debug( ) ; $imap->Debug( 1 ) ; - if ( not $imap->has_capability( 'QUOTA' ) ) { + if ( not $imap->has_capability( 'QUOTA' ) ) + { + myprint( "$Side: No QUOTA capability found, skipping it.\n" ) ; $imap->Debug( $debug_before ) ; return ; } ; - myprint( "\n$Side: found quota, presented in raw IMAP\n" ) ; + myprint( "\n$Side: QUOTA capability found, presented in raw IMAP on next lines\n" ) ; my $getquotaroot = $imap->getquotaroot( 'INBOX' ) ; # Gmail INBOX quotaroot is "" but with it Mail::IMAPClient does a literal GETQUOTA {2} \n "" #$imap->quota( 'ROOT' ) ; @@ -5517,7 +5639,7 @@ sub automap $mysync->{h2_special} = special_from_folders_hash( $mysync, $mysync->{imap2}, 'Host2' ) ; build_possible_special( $mysync ) ; - build_guess_special( $mysync ) ; + build_guess_special( $mysync ) ; build_automap( $mysync ) ; return ; @@ -5653,7 +5775,7 @@ sub build_possible_special 'Junk E-Mail', 'Junk Email'] ; $possible_special->{'\Sent'} = [ 'Sent', 'Sent Messages', 'Sent Items', 'Gesendete Elemente', 'Gesendete Objekte', - '&AMk-l&AOk-ments envoy&AOk-s', 'Envoy&AOk-', 'Objets envoy&AOk-s', + '&AMk-l&AOk-ments envoy&AOk-s', 'E&AwE-le&AwE-ments envoye&AwE-s', 'Envoy&AOk-', 'Objets envoy&AOk-s', 'Elementos enviados', '&kAFP4W4IMH8wojCkMMYw4A-', '&BB4EQgQ,BEAEMAQyBDsENQQ9BD0ESwQ1-', @@ -5728,32 +5850,6 @@ sub special_from_folders_hash return( \%special ) ; } -sub errors_incr -{ - my ( $mysync, @error ) = @ARG ; - $mysync->{nb_errors}++ ; - - if ( @error ) { - errors_log( $mysync, @error ) ; - myprint( @error ) ; - } - - $mysync->{errorsmax} ||= $ERRORS_MAX ; - if ( $mysync->{nb_errors} >= $mysync->{errorsmax} ) { - myprint( "Maximum number of errors $mysync->{errorsmax} reached ( you can change $mysync->{errorsmax} to any value, for example 100 with --errorsmax 100 ). Exiting.\n" ) ; - my $most_common_error = errorsanalyse( errors_log( $mysync ) ) ; - if ( $mysync->{errorsdump} ) { - myprint( errorsdump( errors_log( $mysync ) ) ) ; - myprint( "The most frequent error is $most_common_error\n" ) ; - # again since errorsdump( ) can be very verbose and masquerade previous warning - myprint( "Maximum number of errors $mysync->{errorsmax} reached ( you can change $mysync->{errorsmax} to any value, for example 100 with --errorsmax 100 ). Exiting.\n" ) ; - } - my $exit_value = $EXIT_VALUE_OF_ERR_TYPE{ $most_common_error } || $EXIT_CATCH_ALL ; - #exit_clean( $mysync, $EXIT_WITH_ERRORS_MAX ) ; - exit_clean( $mysync, $exit_value ) ; - } - return ; -} sub tests_errors_log { @@ -5790,6 +5886,52 @@ sub errors_log } + +sub tests_comment_of_error_type +{ + note( 'Entering tests_comment_of_error_type()' ) ; + + is( undef, comment_of_error_type( ), 'comment_of_error_type: no args => undef' ) ; + + my $mysync = { } ; + is( undef, comment_of_error_type( $mysync ), 'comment_of_error_type: undef => undef' ) ; + + is( "", comment_of_error_type( $mysync, '' ), 'comment_of_error_type: "" => ""' ) ; + is( "", comment_of_error_type( $mysync, 'blabla' ), 'comment_of_error_type: blabla => ""' ) ; + + is( "", comment_of_error_type( $mysync, 'ERR_UNCLASSIFIED' ), 'comment_of_error_type: ERR_UNCLASSIFIED => ""' ) ; + + like( comment_of_error_type( $mysync, 'ERR_OVERQUOTA' ), qr{100% full}, 'comment_of_error_type: ERR_OVERQUOTA => matches 100% full' ) ; + + + + note( 'Leaving tests_comment_of_error_type()' ) ; + return ; +} + +sub comment_of_error_type +{ + my $mysync = shift @ARG ; + my $error_type = shift @ARG ; + + if ( ! defined $mysync ) { return ; } + if ( ! defined $error_type ) { return ; } + + my $comment ; + + if ( exists( $COMMENT_OF_ERR_TYPE{ $error_type } ) ) + { + $comment = $COMMENT_OF_ERR_TYPE{ $error_type }->( $mysync ) ; + } + else + { + $comment = "" ; + } + return $comment ; +} + + + sub tests_error_type { note( 'Entering tests_error_type()' ) ; @@ -5851,6 +5993,13 @@ sub tests_error_type 'error_type: could not append ... virus => ERR_APPEND_VIRUS' ) ; + + is( 'ERR_FLAGS', + error_type( 'Host2: flags msg INBOX/957910 could not add flags [PasGlop \PasGlopRe]: 33 NO Error in IMAP command received by server.' ), + 'error_type: could not add flags => ERR_FLAGS' + ) ; + + note( 'Leaving tests_error_type()' ) ; return ; } @@ -5902,6 +6051,10 @@ sub error_type # could not append .*NO header limit reached if ( $error =~ m{could not append} ) { return 'ERR_APPEND' ; } ; + # could not add flags + if ( $error =~ m{could not add flags} ) { return 'ERR_FLAGS' ; } ; + + # Could not create folder .*Invalid mailbox name if ( $error =~ m{Could not create folder} ) { return 'ERR_CREATE' ; } ; @@ -5996,6 +6149,7 @@ sub most_common_error if ( !%{ $errors_counted_ref } ) { return 'ERR_NOTHING_REPORTED' ; } # non empty hash + # in case of equality the winner error is the first in alphabetic order my $most_common_error = ( sort { $errors_counted_ref->{$b} <=> $errors_counted_ref->{$a} @@ -6084,17 +6238,69 @@ sub errorsdump sub errors_listing { my $mysync = shift ; - $mysync->{most_common_error} = errorsanalyse( errors_log( $sync ) ) ; + $mysync->{ most_common_error } = errorsanalyse( errors_log( $mysync ) ) ; - my $errors_listing = join( '', - "++++ Listing $mysync->{nb_errors} errors encountered during the sync ( avoid this listing with --noerrorsdump ).\n", - errorsdump( errors_log( $mysync ) ), - "The most frequent error is $mysync->{most_common_error}\n", + my $errors_listing = '' ; + + if ( $mysync->{ errorsdump } ) + { + $errors_listing = join( '', + "++++ Listing $mysync->{nb_errors} errors encountered during the sync ( avoid this listing with --noerrorsdump ).\n", + errorsdump( errors_log( $mysync ) ), + ) ; + } + + $errors_listing .= join( '', + "The most frequent error is $mysync->{ most_common_error }. ", + comment_of_error_type( $mysync, $mysync->{ most_common_error } ), + "\n", ) ; + return $errors_listing ; } +sub errors_incr +{ + my ( $mysync, @error ) = @ARG ; + $mysync->{ nb_errors }++ ; + + if ( @error ) { + errors_log( $mysync, @error ) ; + myprint( @error ) ; + } + + $mysync->{ errorsmax } ||= $ERRORS_MAX ; + + + if ( $mysync->{ nb_errors } >= $mysync->{ errorsmax } ) + { + myprint( errorsmax_msg( $mysync ) ) ; + myprint( errors_listing( $mysync ) ) ; + + if ( $mysync->{ errorsdump } ) + { + # again since errorsdump( ) can be very verbose and masquerade previous warning + myprint( errorsmax_msg( $mysync ) ) ; + } + my $exit_value = exit_value( $mysync, $mysync->{ most_common_error } ) ; + exit_clean( $mysync, $exit_value ) ; + } + return ; +} + + + +sub errorsmax_msg +{ + my $mysync = shift @ARG ; + my $msg = "Maximum number of errors $mysync->{errorsmax} reached " + . "( you can change $mysync->{errorsmax} to any value, for example 100 with --errorsmax 100 ). " + . "Exiting.\n" ; + return $msg ; +} + + sub tests_live_result @@ -6713,17 +6919,21 @@ sub remove_tmp_files sub cleanup_before_exit { my $mysync = shift ; + remove_tmp_files( $mysync ) ; + if ( $mysync->{imap1} and $mysync->{imap1}->IsConnected() ) { myprint( "Disconnecting from host1 $mysync->{ host1 } user1 $mysync->{ user1 }\n" ) ; $mysync->{imap1}->logout( ) ; } + if ( $mysync->{imap2} and $mysync->{imap2}->IsConnected() ) { myprint( "Disconnecting from host2 $mysync->{ host2 } user2 $mysync->{ user2 }\n" ) ; $mysync->{imap2}->logout( ) ; } + if ( $mysync->{log} ) { myprint( "Log file is $mysync->{logfile} ( to change it, use --logfile filepath ; or use --nolog to turn off logging )\n" ) ; } @@ -6736,16 +6946,50 @@ sub cleanup_before_exit #print( "Closing $mysync->{ logfile }\n" ) ; teefinish( $mysync ) ; } + return ; } +sub tests_exit_value +{ + note( 'Entering tests_exit_value()' ) ; + + is( $EXIT_CATCH_ALL, exit_value( ), 'exit_value: no args => EXIT_CATCH_ALL' ) ; + + my $mysync = { } ; + is( $EXIT_CATCH_ALL, exit_value( $mysync ), 'exit_value: undef => EXIT_CATCH_ALL' ) ; + + is( $EXIT_CATCH_ALL, exit_value( $mysync, 'Blabla_unknown' ), 'exit_value: Blabla => EXIT_CATCH_ALL' ) ; + is( $EXIT_CATCH_ALL, exit_value( $mysync, '' ), 'exit_value: empty => EXIT_CATCH_ALL' ) ; + + + is( $EXIT_OVERQUOTA, exit_value( $mysync, 'ERR_OVERQUOTA' ), 'exit_value: ERR_OVERQUOTA => EXIT_OVERQUOTA' ) ; + is( $EXIT_TRANSFER_EXCEEDED, exit_value( $mysync, 'ERR_TRANSFER_EXCEEDED' ), 'exit_value: ERR_TRANSFER_EXCEEDED => EXIT_TRANSFER_EXCEEDED' ) ; + + note( 'Leaving tests_exit_value()' ) ; + return ; +} + +sub exit_value +{ + my $mysync = shift @ARG ; + my $most_common_error = shift @ARG ; + + if ( ! defined $most_common_error ) { return $EXIT_CATCH_ALL ; } + my $exit_value = $EXIT_VALUE_OF_ERR_TYPE{ $most_common_error } || $EXIT_CATCH_ALL ; + + return $exit_value ; +} + + + sub exit_most_errors { my $mysync = shift @ARG ; myprint( errors_listing( $mysync ) ) ; - my $exit_value = $EXIT_VALUE_OF_ERR_TYPE{ $mysync->{most_common_error} } || $EXIT_CATCH_ALL ; + my $exit_value = exit_value( $mysync, $mysync->{ most_common_error } ) ; exit_clean( $mysync, $exit_value ) ; return ; } @@ -7072,8 +7316,9 @@ sub justconnect2 sub skip_macosx { #return ; - # hostname used to be macosx.polarhome.com - return( 'macosx' eq hostname( ) && ( 'darwin' eq $OSNAME ) ) ; + # hostname is sometimes "macosx.polarhome.com" sometimes "macosx" + return( ( ( 'macosx.polarhome.com' eq hostname( ) ) || ( 'macosx' eq hostname( ) ) ) + && ( 'darwin' eq $OSNAME ) ) ; } sub skip_macosx_binary @@ -7140,7 +7385,7 @@ sub tests_mailimapclient_connect is( 1, $imap->Debug( 1 ), 'mailimapclient_connect ipv4 + ssl: setting Debug( 1 )' ) ; # It sounds stupid but it avoids failures on the next test about $imap->connect - is( '2a01:e34:ecde:70d0:223:54ff:fec2:36d7', resolv( 'petiteipv6.lamiral.info' ), 'resolv: petiteipv6.lamiral.info => 2001:41d0:8:bebd::1' ) ; + is( '2a01:e34:ecde:70d0:223:54ff:fec2:36d7', resolv( 'petiteipv6.lamiral.info' ), 'resolv: petiteipv6.lamiral.info => 2a01:e34:ecde:70d0:223:54ff:fec2:36d7' ) ; like( ref( $imap->connect( ) ), qr/IO::Socket::SSL/, 'mailimapclient_connect ipv6 + ssl: connect to petiteipv6.lamiral.info' ) ; # This one is ok on petite, not on ks2, do not know why, so commented. @@ -7340,6 +7585,9 @@ sub connect_imap $imap->Debug( $acc->{ debugimap } ) ; $imap->Timeout( $acc->{ timeout } ) ; + #$imap->Keepalive( $acc->{ keepalive } ) ; + + my $side = lc $acc->{ Side } ; myprint( "$acc->{ Side }: connecting on $side [$host] port [$port]\n" ) ; @@ -7375,7 +7623,145 @@ sub connect_imap return( $imap ) ; } +sub tests_compress_ssl +{ + note( 'Entering tests_compress_ssl()' ) ; + SKIP: { + if ( skip_macosx( ) ) + { + skip( 'Tests avoided on host polarhome macosx, no clue "ssl3_get_server_certificate:certificate verify failed"', 12 ) ; + } + else + { + my $myimap ; + my $acc = {} ; + $acc->{ Side } = 'HostK' ; + $acc->{ authmech } = 'LOGIN' ; + $acc->{ debugimap } = 1 ; + $acc->{ compress } = 1 ; + $acc->{ N } = 'K' ; + + ok( + $myimap = login_imap( 'test1.lamiral.info', 993, 'test1', 'secret1', + 1, undef, + 1, 100, $acc, {}, + ), 'acc_compress_imap: test1.lamiral.info test1 ssl' ) ; + ok( defined( $myimap ) && $myimap->IsAuthenticated( ), 'acc_compress_imap: test1.lamiral.info test1 ssl IsAuthenticated' ) ; + + + is( $acc->{ imap }, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info ok" ) ; + is( undef, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info 2nd nok" ) ; + + ok( + $myimap = login_imap( 'test1.lamiral.info', 143, 'test1', 'secret1', + 0, undef, + 1, 100, $acc, {}, + ), 'acc_compress_imap: test1.lamiral.info test1 tls' ) ; + ok( $myimap && $myimap->IsAuthenticated( ), 'acc_compress_imap: test1.lamiral.info test1 tls IsAuthenticated' ) ; + + is( $acc->{ imap }, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info tls ok" ) ; + is( undef, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info tls 2nd nok" ) ; + + # Third, no compression + $acc->{ compress } = 0 ; + ok( + $myimap = login_imap( 'test1.lamiral.info', 993, 'test1', 'secret1', + 1, undef, + 1, 100, $acc, {}, + ), 'acc_compress_imap: test1.lamiral.info test1 ssl' ) ; + ok( defined( $myimap ) && $myimap->IsAuthenticated( ), 'acc_compress_imap: test1.lamiral.info test1 ssl IsAuthenticated' ) ; + + + is( undef, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info off ok" ) ; + is( undef, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info 2nd off ok" ) ; + + } + } + note( 'Leaving tests_compress_ssl()' ) ; + return ; +} + +sub tests_compress +{ + note( 'Entering tests_compress()' ) ; + + my $myimap ; + my $acc = {} ; + $acc->{ Side } = 'HostK' ; + $acc->{ authmech } = 'LOGIN' ; + $acc->{ debugimap } = 1 ; + $acc->{ compress } = 1 ; + $acc->{ N } = 'K' ; + + ok( + $myimap = login_imap( 'test1.lamiral.info', 143, 'test1', 'secret1', + 0, 0, + 1, 100, $acc, {}, + ), 'acc_compress_imap: test1.lamiral.info test1' ) ; + ok( defined( $myimap ) && $myimap->IsAuthenticated( ), 'acc_compress_imap: test1.lamiral.info test1 IsAuthenticated' ) ; + + + is( $acc->{ imap }, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info ok" ) ; + is( undef, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info 2nd nok" ) ; + + ok( + $myimap = login_imap( 'test1.lamiral.info', 143, 'test1', 'secret1', + 0, 0, + 1, 100, $acc, {}, + ), 'acc_compress_imap: test1.lamiral.info test1 tls' ) ; + ok( $myimap && $myimap->IsAuthenticated( ), 'acc_compress_imap: test1.lamiral.info test1 tls IsAuthenticated' ) ; + + is( $acc->{ imap }, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info tls ok" ) ; + is( undef, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info tls 2nd nok" ) ; + + # Third, no compression + $acc->{ compress } = 0 ; + ok( + $myimap = login_imap( 'test1.lamiral.info', 143, 'test1', 'secret1', + 0, 0, + 1, 100, $acc, {}, + ), 'acc_compress_imap: test1.lamiral.info test1 ssl' ) ; + ok( defined( $myimap ) && $myimap->IsAuthenticated( ), 'acc_compress_imap: test1.lamiral.info test1 ssl IsAuthenticated' ) ; + + + is( undef, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info off ok" ) ; + is( undef, acc_compress_imap( $acc ), "acc_compress_imap: test1.lamiral.info 2nd off ok" ) ; + + note( 'Leaving tests_compress()' ) ; + return ; +} + + +sub acc_compress_imap +{ + my $acc = shift ; + + if ( ! defined( $acc ) ) { return ; } + + my $ret ; + my $imap = $acc->{ imap } ; + if ( ! defined $imap ) { return ; } + + if ( $imap && $acc->{ compress } ) + { + myprint( "$acc->{ Side }: Trying to turn imap compression on. Use --nocompress" . $acc->{ N } . " to avoid compression on " . lc( $acc->{ Side } ) . "\n" ) ; + if ( $ret = $imap->compress() ) + { + myprint( "$acc->{ Side }: Compression is on now\n" ) ; + } + else + { + myprint( "$acc->{ Side }: Failed to turn compression on\n" ) ; + } + } + else + { + myprint( "$acc->{ Side }: Compression is off. Use --compress" . $acc->{ N } . " to allow compression on " . lc( $acc->{ Side } ) . "\n" ) ; + } + # $ret is $acc->{ imap } on success, undef on failure or when there is nothing to do. + return $ret ; +} sub tests_login_imap { @@ -7384,12 +7770,12 @@ sub tests_login_imap is( undef, login_imap( ), 'login_imap: no args => undef' ) ; SKIP: { - if ( skip_macosx_binary( ) ) + if ( skip_macosx( ) ) { - skip( 'Tests avoided only on binary on host polarhome macosx, no clue "ssl3_get_server_certificate:certificate verify failed"', 11 ) ; + skip( 'Tests avoided only on binary on host polarhome macosx, no clue "ssl3_get_server_certificate:certificate verify failed"', 15 ) ; } else{ - + my $myimap ; my $acc = {} ; $acc->{ Side } = 'HostK' ; @@ -7399,8 +7785,14 @@ sub tests_login_imap # echo | openssl s_client -crlf -connect test1.lamiral.info:993 # ... # certificate has expired - # Fix: - # ssh root@test1.lamiral.info 'apt update && apt upgrade && /etc/init.d/dovecot restart' + # Fix: ssh root@test1.lamiral.info 'apt update && apt upgrade && /etc/init.d/dovecot restart' + # + # or + # echo | openssl s_client -crlf -connect test1.lamiral.info:993 + # ... + # Verify return code: 9 (certificate is not yet valid) + # Fix: /etc/init.d/openntpd restart + # 2021_09_04 done ok( $myimap = login_imap( 'test1.lamiral.info', 993, 'test1', 'secret1', 1, undef, @@ -7408,12 +7800,15 @@ sub tests_login_imap ), 'login_imap: test1.lamiral.info test1 ssl' ) ; ok( defined( $myimap ) && $myimap->IsAuthenticated( ), 'login_imap: test1.lamiral.info test1 ssl IsAuthenticated' ) ; + is( $myimap, $acc->{ imap }, "login_imap: acc->{ imap } ok test1 ssl") ; + ok( $myimap = login_imap( 'test1.lamiral.info', 143, 'test1', 'secret1', 0, undef, 1, 100, $acc, {}, ), 'login_imap: test1.lamiral.info test1 tls' ) ; ok( $myimap && $myimap->IsAuthenticated( ), 'login_imap: test1.lamiral.info test1 tls IsAuthenticated' ) ; + is( $myimap, $acc->{ imap }, "login_imap: acc->{ imap } ok test1 tls") ; #$IO::Socket::SSL::DEBUG = 4 ; $acc->{sslargs} = { SSL_version => 'SSLv2' } ; @@ -7425,7 +7820,7 @@ sub tests_login_imap ), 'login_imap: test1.lamiral.info test1 tls SSLv2 not supported' ) ; #SSL_verify_mode => 1 #SSL_version => 'TLSv1_1' - + is( undef, $acc->{ imap }, "login_imap: acc->{ imap } test1 tls error => undef") ; # I have left ? exit_clean to be replaced by errors_incr( $mysync, 'error message' ) @@ -7443,6 +7838,7 @@ sub tests_login_imap ), 'login_imap: noresol.lamiral.info undef' ) ; is( 'ERR_CONNECTION_FAILURE_HOST2', errorsanalyse( errors_log( $mysync ) ), 'login_imap: Host2 noresol.lamiral.info => ERR_CONNECTION_FAILURE_HOST2' ) ; + is( undef, $acc->{ imap }, "login_imap: acc->{ imap } noresol error => undef") ; # authentication failure for user2 $mysync = {} ; @@ -7469,7 +7865,7 @@ sub tests_login_imap } } - + note( 'Leaving tests_login_imap()' ) ; return ; } @@ -7488,7 +7884,7 @@ sub oauthgenerateaccess sub tests_login_imap_oauth { note( 'Entering tests_login_imap_oauth()' ) ; - + oauthgenerateaccess() ; SKIP: { @@ -7552,54 +7948,65 @@ sub tests_login_imap_oauth } } - # oauthdirect authentication success for user1 + # oauthdirect authentication success for user1 SKIP: { - if ( ! -r 'oauth2/D_oauth2_oauthdirect_imapsync.gl0@gmail.com.txt' ) + if ( ! -r 'oauth2/D_oauth2_oauthdirect_imapsync.gl0@gmail.com.txt' ) { - skip( 'oauthdirect: no oauthdirect file', 2 ) ; + skip( 'oauthdirect: no oauthdirect file', 6 ) ; } my $myimap ; - my $mysync = {} ; - my $acc = {} ; - $acc->{ Side } = 'Host1' ; - $acc->{ oauthdirect } = 'oauth2/D_oauth2_oauthdirect_imapsync.gl0@gmail.com.txt' ; - $acc->{ debugimap } = 1 ; - $mysync->{ showpasswords } = 1 ; - $acc->{ authmech } = 'QQQ' ; - isa_ok( - $myimap = login_imap( 'imap.gmail.com', 993, 'user_useless', 'password_useless', - 1, undef, - 1, 100, $acc, $mysync, - ), 'Mail::IMAPClient', 'login_imap: user1 good oauthdirect => Mail::IMAPClient' ) ; + my $mysync = {} ; + my $acc = {} ; + $acc->{ Side } = 'Host1' ; + $acc->{ oauthdirect } = 'oauth2/D_oauth2_oauthdirect_imapsync.gl0@gmail.com.txt' ; + $acc->{ debugimap } = 1 ; + $mysync->{ showpasswords } = 1 ; + $acc->{ authmech } = 'QQQ' ; + isa_ok( + $myimap = login_imap( 'imap.gmail.com', 993, 'user_useless', 'password_useless', + 1, undef, + 1, 100, $acc, $mysync, + ), 'Mail::IMAPClient', 'login_imap: user1 good oauthdirect => Mail::IMAPClient' ) ; - ok( defined( $myimap ) && $myimap->IsAuthenticated( ), 'login_imap: gmail oauth2 IsAuthenticated' ) ; + ok( defined( $myimap ) && $myimap->IsAuthenticated( ), 'login_imap: gmail oauth2 oauthdirect IsAuthenticated' ) ; + + ok( defined( $myimap ) && $myimap->logout( ), 'login_imap: gmail oauth2 oauthdirect logout' ) ; + ok( defined( $myimap ) && ! $myimap->IsAuthenticated( ), 'login_imap: gmail oauth2 oauthdirect not IsAuthenticated after logout' ) ; + ok( defined( $myimap ) && $myimap->reconnect( ), 'login_imap: gmail oauth2 oauthdirect reconnect ok' ) ; + ok( defined( $myimap ) && $myimap->IsAuthenticated( ), 'login_imap: gmail oauth2 oauthdirect IsAuthenticated after reconnect' ) ; } - - # oauthaccesstoken authentication success for user1 + + + + # oauthaccesstoken authentication success for user1 SKIP: { - if ( ! -r 'oauth2/D_oauth2_access_token_imapsync.gl0@gmail.com.txt' ) + if ( ! -r 'oauth2/D_oauth2_access_token_imapsync.gl0@gmail.com.txt' ) { - skip( 'oauthaccesstoken: no access_token file', 2 ) ; + skip( 'oauthaccesstoken: no access_token file', 6 ) ; } my $myimap ; - my $mysync = {} ; - my $acc = {} ; - $acc->{ Side } = 'Host1' ; - $acc->{ oauthaccesstoken } = 'oauth2/D_oauth2_access_token_imapsync.gl0@gmail.com.txt' ; - $acc->{ debugimap } = 1 ; - $mysync->{ showpasswords } = 1 ; - $acc->{ authmech } = 'QQQ' ; - isa_ok( - $myimap = login_imap( 'imap.gmail.com', 993, 'imapsync.gl0@gmail.com', 'password_useless', - 1, undef, - 1, 100, $acc, $mysync, - ), 'Mail::IMAPClient', 'login_imap: user1 good oauthaccesstoken => Mail::IMAPClient' ) ; + my $mysync = {} ; + my $acc = {} ; + $acc->{ Side } = 'Host1' ; + $acc->{ oauthaccesstoken } = 'oauth2/D_oauth2_access_token_imapsync.gl0@gmail.com.txt' ; + $acc->{ debugimap } = 1 ; + $mysync->{ showpasswords } = 1 ; + $acc->{ authmech } = 'QQQ' ; + isa_ok( + $myimap = login_imap( 'imap.gmail.com', 993, 'imapsync.gl0@gmail.com', 'password_useless', + 1, undef, + 1, 100, $acc, $mysync, + ), 'Mail::IMAPClient', 'login_imap: user1 good oauthaccesstoken => Mail::IMAPClient' ) ; - ok( defined( $myimap ) && $myimap->IsAuthenticated( ), 'login_imap: gmail oauth2 oauthaccesstoken IsAuthenticated' ) ; + ok( defined( $myimap ) && $myimap->IsAuthenticated( ), 'login_imap: gmail oauth2 oauthaccesstoken IsAuthenticated' ) ; + ok( defined( $myimap ) && $myimap->logout( ), 'login_imap: gmail oauth2 oauthaccesstoken logout' ) ; + ok( defined( $myimap ) && ! $myimap->IsAuthenticated( ), 'login_imap: gmail oauth2 oauthaccesstoken not IsAuthenticated after logout' ) ; + ok( defined( $myimap ) && $myimap->reconnect( ), 'login_imap: gmail oauth2 oauthaccesstoken reconnect ok' ) ; + ok( defined( $myimap ) && $myimap->IsAuthenticated( ), 'login_imap: gmail oauth2 oauthaccesstoken IsAuthenticated after reconnect' ) ; } - - + + note( 'Leaving tests_login_imap_oauth()' ) ; return ; } @@ -7614,6 +8021,8 @@ sub login_imap $ssl, $tls, $uid, $split, $acc, $mysync ) = @allargs ; + $acc->{ imap } = undef ; + if ( ! all_defined( $host, $port, $user, $acc->{ Side } ) ) { return ; @@ -7676,6 +8085,7 @@ sub login_imap if ( authenticate_imap( $imap, @allargs ) ) { myprint( "$acc->{ Side }: success login on [$host] with user [$user] auth [$acc->{ authmech }] or [LOGIN]\n" ) ; + $acc->{ imap } = $imap ; return( $imap ) ; } else @@ -7715,19 +8125,27 @@ sub init_imap $imap->Buffer( $buffersize || $DEFAULT_BUFFER_SIZE ) ; $imap->Uid( $uid ) ; - $imap->Peek( 1 ) ; $imap->Debug( $acc->{ debugimap } ) ; if ( $mysync->{ showpasswords } ) { $imap->Showcredentials( 1 ) ; } - defined $acc->{ timeout } and $imap->Timeout( $acc->{ timeout } ) ; + if ( defined( $acc->{ timeout } ) ) + { + $imap->Timeout( $acc->{ timeout } ) ; + } + + if ( defined $acc->{ keepalive } ) + { + $imap->Keepalive( $acc->{ keepalive } ) ; + } if ( defined $acc->{ reconnectretry } ) { $imap->Reconnectretry( $acc->{ reconnectretry } ) ; } + $imap->{IMAPSYNC_RECONNECT_COUNT} = 0 ; $imap->Ignoresizeerrors( $allowsizemismatch ) ; $split and $imap->Maxcommandlength( $SPLIT_FACTOR * $split ) ; @@ -7768,15 +8186,15 @@ sub authenticate_imap $acc->{ authmech } = 'XOAUTH2 direct' ; return( oauthdirect( $mysync, $acc, $imap, $host, $user ) ) ; } - - + + if ( defined $acc->{ oauthaccesstoken } ) { $acc->{ authmech } = 'XOAUTH2 accesstoken' ; return( oauthaccesstoken( $mysync, $acc, $imap, $host, $user ) ) ; } - - + + if ( $acc->{ proxyauth } ) { @@ -7877,7 +8295,12 @@ sub oauthdirect { $oauthdirect_str = $acc->{ oauthdirect } || 'Please define oauthdirect value' ; } - if ( $imap->authenticate('XOAUTH2', sub { return $oauthdirect_str } ) ) + + $imap->Authmechanism( 'XOAUTH2' ) ; + $imap->Authcallback( sub { return $oauthdirect_str } ) ; + + #if ( $imap->authenticate('XOAUTH2', sub { return $oauthdirect_str } ) ) + if ( $imap->login( ) ) { return 1 ; } @@ -7905,7 +8328,7 @@ sub oauthaccesstoken { $oauthaccesstoken_str = $acc->{ oauthaccesstoken } || 'Please define oauthaccesstoken value' ; } - + my $oauth_string = "user=" . $user . "\x01auth=Bearer ". $oauthaccesstoken_str . "\x01\x01" ; #myprint "oauth_string: $oauth_string\n" ; @@ -7913,8 +8336,12 @@ sub oauthaccesstoken #myprint "oauth_string_base64: $oauth_string_base64\n" ; my $oauthdirect_str = $oauth_string_base64 ; - - if ( $imap->authenticate('XOAUTH2', sub { return $oauthdirect_str } ) ) + + $imap->Authmechanism( 'XOAUTH2' ) ; + $imap->Authcallback( sub { return $oauthdirect_str } ) ; + + #if ( $imap->authenticate('XOAUTH2', sub { return $oauthdirect_str } ) ) + if ( $imap->login( ) ) { return 1 ; } @@ -8027,7 +8454,7 @@ sub plainauth my $imap = shift; my $string = mysprintf("%s\x00%s\x00%s", $imap->User, - $imap->Authuser, $imap->Password); + defined $imap->Authuser ? $imap->Authuser : "", $imap->Password); return encode_base64("$string", q{}); } @@ -8203,6 +8630,38 @@ sub xmasterauth return ; } +sub keepalive1 +{ + my $mysync = shift ; + + $mysync->{ acc1 }->{ keepalive } = defined $mysync->{ acc1 }->{ keepalive } ? $mysync->{ acc1 }->{ keepalive } : 1 ; + + if ( $mysync->{ acc1 }->{ keepalive } ) + { + myprint( "Host1: imap connection keepalive is on on host1. Use --nokeepalive1 to disable it.\n" ) ; + } + else + { + myprint( "Host1: imap connection keepalive is off on host1. Use --keepalive1 to enable it.\n" ) ; + } +} + +sub keepalive2 +{ + my $mysync = shift ; + + $mysync->{ acc2 }->{ keepalive } = defined $mysync->{ acc2 }->{ keepalive } ? $mysync->{ acc2 }->{ keepalive } : 1 ; + + if ( $mysync->{ acc2 }->{ keepalive } ) + { + myprint( "Host2: imap connection keepalive is on on host2. Use --nokeepalive2 to disable it.\n" ) ; + } + else + { + myprint( "Host2: imap connection keepalive is off on host2. Use --keepalive2 to enable it.\n" ) ; + } +} + sub banner_imapsync @@ -8212,8 +8671,8 @@ sub banner_imapsync my $banner_imapsync = join q{}, q{$RCSfile: imapsync,v $ }, - q{$Revision: 2.148 $ }, - q{$Date: 2021/07/22 14:21:09 $ }, + q{$Revision: 2.178 $ }, + q{$Date: 2022/01/12 21:28:37 $ }, "\n", "Command line used, run by $EXECUTABLE_NAME:\n", "$PROGRAM_NAME ", command_line_nopassword( $mysync, @argv ), "\n" ; @@ -8342,16 +8801,16 @@ sub remove_pidfile_not_running { # my $pid_filename = shift @ARG ; - + #myprint( "In remove_pidfile_not_running $pid_filename\n" ) ; if ( ! $pid_filename ) { myprint( "No variable pid_filename\n" ) ; return } ; if ( ! -e $pid_filename ) - { + { myprint( "File $pid_filename does not exist\n" ) ; return ; } #myprint( "Still In remove_pidfile_not_running $pid_filename\n" ) ; - + if ( ! -f $pid_filename ) { myprint( "File $pid_filename is not a file\n" ) ; return } ; my $pid = firstline( $pid_filename ) ; @@ -8437,7 +8896,7 @@ sub tail if ( ! $tail ) { return ; } if ( ! -e $pidfile ) { return ; } - + my $pidtotail = firstline( $pidfile ) ; if ( ! $pidtotail ) { return ; } @@ -8550,7 +9009,7 @@ sub write_pidfile { # returns undef if something is considered fatal # returns 1 otherwise - + #myprint( "In write_pidfile\n" ) ; if ( ! @ARG ) { return 1 ; } @@ -8912,6 +9371,7 @@ sub create_folder return( create_folder_old( $mysync, $myimap2 , $h2_fold , $h1_fold ) ) ; } + # $imap->exists() calls $imap->status() that does an IMAP STATUS folder myprint( "Creating folder [$h2_fold] on host2\n" ) ; if ( ( 'INBOX' eq uc $h2_fold ) and ( $myimap2->exists( $h2_fold ) ) ) { @@ -8944,9 +9404,12 @@ sub create_folder "Could not create folder [$h2_fold] from [$h1_fold]: " , $myimap2->LastError( ), "\n" ; errors_incr( $mysync, $error ) ; - # success if folder exists ("already exists" error) - return( 1 ) if $myimap2->exists( $h2_fold ) ; - # failure since create failed + # success if folder exists ("already exists" error) or selectable + if ( $myimap2->exists( $h2_fold ) or select_folder( $mysync, $myimap2, $h2_fold, 'Host2' ) ) + { + return( 1 ) ; + } + # failure since create failed + not exist + not selectable return( 0 ) ; }else{ #create succeeded @@ -10119,8 +10582,8 @@ sub tests_regexflags { note( 'Entering tests_regexflags()' ) ; - my $mysync = {} ; - + my $mysync = {} ; + ok( q{} eq regexflags( $mysync, q{} ), 'regexflags, null string q{}' ) ; ok( q{\Seen NonJunk $Spam} eq regexflags( $mysync, q{\Seen NonJunk $Spam} ), q{regexflags, nothing to do} ) ; @@ -10214,14 +10677,14 @@ sub tests_regexflags $mysync->{ regexflag } = [ ] ; $mysync->{ filterbuggyflags } = 1 ; filterbuggyflags( $mysync ) ; - + is( '\Deleted \Answered \Draft \Flagged', regexflags( $mysync, '\\Deleted \\Answered \\RECEIPTCHECKED \\Draft \\Indexed \\Flagged' ), 'regexflags: remove famous /X 1' ) ; is( '\\Deleted \\Flagged \\Answered \\Draft', regexflags( $mysync, '\\Deleted \\RECEIPTCHECKED \\Flagged \\Answered \\Indexed \\Draft' ), - 'regexflags: remove famous /X 2' ) ; + 'regexflags: remove famous /X 2' ) ; is( '\ ', '\\ ', 'regexflags: \ is \\ ' ) ; is( '\\ ', '\\ ', 'regexflags: \\ is \\ ' ) ; @@ -10234,7 +10697,7 @@ sub regexflags { my $mysync = shift ; my $flags = shift ; - + foreach my $regexflag ( @{ $mysync->{ regexflag } } ) { my $flags_orig = $flags ; @@ -10347,18 +10810,21 @@ sub tests_permanentflags { note( 'Entering tests_permanentflags()' ) ; - my $string; - ok(q{} eq permanentflags(' * OK [PERMANENTFLAGS (\* \Draft \Answered)] Limited'), - 'permanentflags \*'); - ok('\Draft \Answered' eq permanentflags(' * OK [PERMANENTFLAGS (\Draft \Answered)] Limited'), - 'permanentflags \Draft \Answered'); - ok('\Draft \Answered' - eq permanentflags('Blabla', + my $mysync = { } ; + ok( q{} eq permanentflags( $mysync, ' * OK [PERMANENTFLAGS (\* \Draft \Answered)] Limited' ), + 'permanentflags \*' ) ; + + ok( '\Draft \Answered' eq permanentflags( $mysync, ' * OK [PERMANENTFLAGS (\Draft \Answered)] Limited' ), + 'permanentflags \Draft \Answered' ) ; + + ok( '\Draft \Answered' + eq permanentflags( $mysync, 'Blabla', ' * OK [PERMANENTFLAGS (\Draft \Answered)] Limited', - 'Blabla'), + 'Blabla' ), 'permanentflags \Draft \Answered' - ); - ok(q{} eq permanentflags('Blabla'), 'permanentflags nothing'); + ) ; + + ok( q{} eq permanentflags( $mysync, 'Blabla' ), 'permanentflags nothing' ) ; note( 'Leaving tests_permanentflags()' ) ; return ; @@ -10366,7 +10832,9 @@ sub tests_permanentflags sub permanentflags { - my @lines = @_ ; + my $mysync = shift ; + + my @lines = @_ ; foreach my $line (@lines) { if ( $line =~ m{\[PERMANENTFLAGS\s\(([^)]+?)\)\]}x ) { @@ -10449,37 +10917,37 @@ sub tests_flags_for_host2 note( 'Entering tests_flags_for_host2()' ) ; is( undef, flags_for_host2( ), 'flags_for_host2: no args => undef' ) ; - + my $mysync ; is( undef, flags_for_host2( $mysync ), 'flags_for_host2: undef => undef' ) ; - + $mysync = { } ; is( undef, flags_for_host2( $mysync ), 'flags_for_host2: nothing => undef' ) ; - + is( q{}, flags_for_host2( $mysync, '' ), 'flags_for_host2: no flags => empty string' ) ; - + is( q{}, flags_for_host2( $mysync, '\Recent' ), 'flags_for_host2: \Recent => empty string' ) ; - + is( q{\Seen}, flags_for_host2( $mysync, '\Recent \Seen' ), 'flags_for_host2: \Recent \Seen => \Seen' ) ; - + is( q{\Deleted \Seen}, flags_for_host2( $mysync, '\Deleted \Recent \Seen' ), 'flags_for_host2: \Deleted \Recent \Seen => \Deleted \Seen' ) ; - + $mysync->{ flagscase } = 0 ; is( q{\DELETED \Seen}, flags_for_host2( $mysync, '\DELETED \Seen' ), 'flags_for_host2: flagscase = 0 \DELETED \Seen => \DELETED \Seen' ) ; - + $mysync->{ flagscase } = 1 ; is( q{\Deleted \Seen}, flags_for_host2( $mysync, '\DELETED \Seen' ), 'flags_for_host2: flagscase = 1 \DELETED \Seen => \Deleted \Seen' ) ; - + $mysync->{ filterflags } = 0 ; is( q{\Seen \Blabla}, flags_for_host2( $mysync, '\Seen \Blabla', '\Seen \Junk' ), 'flags_for_host2: filterflags = 0 \Seen \Blabla among \Seen \Junk => \Seen \Blabla' ) ; - + $mysync->{ filterflags } = 1 ; is( q{\Seen}, flags_for_host2( $mysync, '\Seen \Blabla', '\Seen \Junk' ), 'flags_for_host2: filterflags = 1 \Seen \Blabla among \Seen \Junk => \Seen' ) ; - + $mysync->{ filterflags } = 1 ; is( q{\Seen \Blabla}, flags_for_host2( $mysync, '\Seen \Blabla', '' ), 'flags_for_host2: filterflags = 1 \Seen \Blabla among "" => \Seen \Blabla' ) ; - - + + note( 'Leaving tests_flags_for_host2()' ) ; return ; } @@ -10492,27 +10960,27 @@ sub flags_for_host2 my $mysync = shift ; my $h1_flags = shift ; my $permanentflags2 = shift ; - - if ( ! all_defined( $mysync, $h1_flags ) ) { return ; } ; - + + if ( ! all_defined( $mysync, $h1_flags ) ) { return ; } ; + # RFC 2060: This flag can not be altered by any client $h1_flags =~ s@\\Recent\s?@@xgi ; - + my $h1_flags_re ; if ( $mysync->{ regexflag } and defined( $h1_flags_re = regexflags( $mysync, $h1_flags ) ) ) { $h1_flags = $h1_flags_re ; } - + if ( $mysync->{ flagscase } ) { $h1_flags = flagscase( $h1_flags ) ; } - + if ( $permanentflags2 and $mysync->{ filterflags } ) { $h1_flags = flags_filter( $h1_flags, $permanentflags2 ) ; } - + return( $h1_flags ) ; } @@ -11052,17 +11520,59 @@ sub message_for_host2 $string_len = length_ref( $string_ref ) ; - $debugcontent and myprint( - q{=} x $STD_CHAR_PER_LINE, "\n", - "F message content begin next line ($string_len characters long)\n", - ${ $string_ref }, - "\nF message content ended on previous line\n", q{=} x $STD_CHAR_PER_LINE, "\n" ) ; + $mysync->{ debugcontent } and myprint( debugcontent( $mysync, $string_ref ) ) ; myprint( debugmemory( $mysync, " at M3" ) ) ; return $string_len ; } +sub tests_debugcontent +{ + note( 'Entering tests_debugcontent()' ) ; + + is( undef, debugcontent( ), 'debugcontent: no args => undef' ) ; + my $mysync = { } ; + is( undef, debugcontent( $mysync ), 'debugcontent: undef => undef' ) ; + is( undef, debugcontent( $mysync, 'mm' ), 'debugcontent: undef, mm => undef' ) ; + #my $string_ref = \'zztop' ; + my $string = '================================================================================ +F message content begin next line (2 characters long) +mm +F message content ended on previous line +================================================================================ +' ; + is( $string, debugcontent( $mysync, \'mm' ), 'debugcontent: undef, mm => mm' ) ; + + note( 'Leaving tests_debugcontent()' ) ; + return ; +} + +sub debugcontent +{ + my $mysync = shift @ARG ; + if ( ! defined $mysync ) { return ; } + + my $string_ref = shift @ARG ; + if ( ! defined $string_ref ) { return ; } + if ( 'SCALAR' ne ref( $string_ref ) ) { return ; } + + my $string_len = length_ref( $string_ref ) ; + + my $string = join( '', + q{=} x $STD_CHAR_PER_LINE, "\n", + "F message content begin next line ($string_len characters long)\n", + ${ $string_ref }, + "\nF message content ended on previous line\n", q{=} x $STD_CHAR_PER_LINE, "\n", + ) ; + + return $string ; +} + + + + + sub tests_truncmess { note( 'Entering tests_truncmess()' ) ; @@ -11809,9 +12319,9 @@ sub append_message_on_host2 $mysync->{ biggest_message_transferred } = max( $string_len, $mysync->{ biggest_message_transferred } ) ; my $time_spent = timesince( $mysync->{begin_transfer_time} ) ; - my $rate = bytes_display_string( $mysync->{total_bytes_transferred} / $time_spent ) ; + my $rate = bytes_display_string_bin( $mysync->{total_bytes_transferred} / $time_spent ) ; my $eta = eta( $mysync ) ; - my $amount_transferred = bytes_display_string( $mysync->{total_bytes_transferred} ) ; + my $amount_transferred = bytes_display_string_bin( $mysync->{total_bytes_transferred} ) ; myprintf( "msg %s/%-19s copied to %s/%-10s %.2f msgs/s %s/s %s copied %s\n", $h1_fold, "$h1_msg {$string_len}", $h2_fold, $new_id, $mysync->{nb_msg_transferred}/$time_spent, $rate, $amount_transferred, @@ -14052,42 +14562,72 @@ sub skipmess -sub tests_bytes_display_string +sub tests_bytes_display_string_bin { - note( 'Entering tests_bytes_display_string()' ) ; + note( 'Entering tests_bytes_display_string_bin()' ) ; + + is( 'NA', bytes_display_string_bin( ), 'bytes_display_string_bin: no args => NA' ) ; + is( 'NA', bytes_display_string_bin( undef ), 'bytes_display_string_bin: undef => NA' ) ; + is( 'NA', bytes_display_string_bin( 'blabla' ), 'bytes_display_string_bin: blabla => NA' ) ; + + is( '0.000 KiB', bytes_display_string_bin( 0 ), 'bytes_display_string_bin: 0 => 0.000 KiB' ) ; + is( '0.001 KiB', bytes_display_string_bin( 1 ), 'bytes_display_string_bin: 1 => 0.001 KiB' ) ; + is( '0.010 KiB', bytes_display_string_bin( 10 ), 'bytes_display_string_bin: 10 => 0.010 KiB' ) ; + is( '0.976 KiB', bytes_display_string_bin( 999 ), 'bytes_display_string_bin: 999 => 0.976 KiB' ) ; + note( bytes_display_string_bin( 999 ) ) ; + + is( '0.999 KiB', bytes_display_string_bin( 1023 ), 'bytes_display_string_bin: 1023 => 0.999 KiB' ) ; + note( bytes_display_string_bin( 1023 ) ) ; + is( '1.000 KiB', bytes_display_string_bin( 1024 ), 'bytes_display_string_bin: 1024 => 1.000 KiB' ) ; + note( bytes_display_string_bin( 1024 ) ) ; + is( '1.001 KiB', bytes_display_string_bin( 1025 ), 'bytes_display_string_bin: 1025 => 1.001 KiB' ) ; + + is( '9.999 KiB', bytes_display_string_bin( 10_239 ), 'bytes_display_string_bin: 10_239 => 9.999 KiB' ) ; + note( bytes_display_string_bin( 10_239 ) ) ; + + is( '10.000 KiB', bytes_display_string_bin( 10_240 ), 'bytes_display_string_bin: 10_240 => 10.000 KiB' ) ; + note( bytes_display_string_bin( 10_240 ) ) ; + + is( '999.999 KiB', bytes_display_string_bin( 1_023_999 ), 'bytes_display_string_bin: 1_023_999 => 999.999 KiB' ) ; + note( bytes_display_string_bin( 1_023_999 ) ) ; + + is( '0.977 MiB', bytes_display_string_bin( 1_024_000 ), 'bytes_display_string_bin: 1_024_000 => 0.977 MiB' ) ; + note( bytes_display_string_bin( 1_024_000 ) ) ; + + is( '0.999 MiB', bytes_display_string_bin( 1_047_527 ), 'bytes_display_string_bin: 1_047_527 => 0.999 MiB' ) ; + note( bytes_display_string_bin( 1_047_527 ) ) ; + + is( '0.999 MiB', bytes_display_string_bin( 1_048_051 ), 'bytes_display_string_bin: 1_048_051 => 0.999 MiB' ) ; + note( bytes_display_string_bin( 1_048_051 ) ) ; + + is( '1.000 MiB', bytes_display_string_bin( 1_048_052 ), 'bytes_display_string_bin: 1_048_052 => 1.000 MiB' ) ; + note( bytes_display_string_bin( 1_048_052 ) ) ; + + is( '1.000 MiB', bytes_display_string_bin( 1_048_575 ), 'bytes_display_string_bin: 1_048_575 => 1.000 MiB' ) ; + is( '1.000 MiB', bytes_display_string_bin( 1_048_576 ), 'bytes_display_string_bin: 1_048_576 => 1.000 MiB' ) ; + + is( '1.000 GiB', bytes_display_string_bin( 1_073_741_823 ), 'bytes_display_string_bin: 1_073_741_823 => 1.000 GiB' ) ; + is( '1.000 GiB', bytes_display_string_bin( 1_073_741_824 ), 'bytes_display_string_bin: 1_073_741_824 => 1.000 GiB' ) ; - is( 'NA', bytes_display_string( ), 'bytes_display_string: no args => NA' ) ; - is( 'NA', bytes_display_string( undef ), 'bytes_display_string: undef => NA' ) ; - is( 'NA', bytes_display_string( 'blabla' ), 'bytes_display_string: blabla => NA' ) ; + is( '1.000 TiB', bytes_display_string_bin( 1_099_511_627_775 ), 'bytes_display_string_bin: 1_099_511_627_775 => 1.000 TiB' ) ; + is( '1.000 TiB', bytes_display_string_bin( 1_099_511_627_776 ), 'bytes_display_string_bin: 1_099_511_627_776 => 1.000 TiB' ) ; - is( '0.000 KiB', bytes_display_string( 0 ), 'bytes_display_string: 0' ) ; - is( '0.001 KiB', bytes_display_string( 1 ), 'bytes_display_string: 1' ) ; - is( '0.010 KiB', bytes_display_string( 10 ), 'bytes_display_string: 10' ) ; - is( '1.000 MiB', bytes_display_string( 1_048_575 ), 'bytes_display_string: 1_048_575' ) ; - is( '1.000 MiB', bytes_display_string( 1_048_576 ), 'bytes_display_string: 1_048_576' ) ; + is( '1.000 PiB', bytes_display_string_bin( 1_125_899_906_842_623 ), 'bytes_display_string_bin: 1_125_899_906_842_623 => 1.000 PiB' ) ; + is( '1.000 PiB', bytes_display_string_bin( 1_125_899_906_842_624 ), 'bytes_display_string_bin: 1_125_899_906_842_624 => 1.000 PiB' ) ; - is( '1.000 GiB', bytes_display_string( 1_073_741_823 ), 'bytes_display_string: 1_073_741_823 ' ) ; - is( '1.000 GiB', bytes_display_string( 1_073_741_824 ), 'bytes_display_string: 1_073_741_824 ' ) ; + is( '1024.000 PiB', bytes_display_string_bin( 1_152_921_504_606_846_975 ), 'bytes_display_string_bin: 1_152_921_504_606_846_975 => 1024.000 PiB' ) ; + is( '1024.000 PiB', bytes_display_string_bin( 1_152_921_504_606_846_976 ), 'bytes_display_string_bin: 1_152_921_504_606_846_976 => 1024.000 PiB' ) ; - is( '1.000 TiB', bytes_display_string( 1_099_511_627_775 ), 'bytes_display_string: 1_099_511_627_775' ) ; - is( '1.000 TiB', bytes_display_string( 1_099_511_627_776 ), 'bytes_display_string: 1_099_511_627_776' ) ; - - is( '1.000 PiB', bytes_display_string( 1_125_899_906_842_623 ), 'bytes_display_string: 1_125_899_906_842_623' ) ; - is( '1.000 PiB', bytes_display_string( 1_125_899_906_842_624 ), 'bytes_display_string: 1_125_899_906_842_624' ) ; - - is( '1024.000 PiB', bytes_display_string( 1_152_921_504_606_846_975 ), 'bytes_display_string: 1_152_921_504_606_846_975' ) ; - is( '1024.000 PiB', bytes_display_string( 1_152_921_504_606_846_976 ), 'bytes_display_string: 1_152_921_504_606_846_976' ) ; - - is( '1048576.000 PiB', bytes_display_string( 1_180_591_620_717_411_303_424 ), 'bytes_display_string: 1_180_591_620_717_411_303_424' ) ; - - #myprint( bytes_display_string( 1_180_591_620_717_411_303_424 ), "\n" ) ; - note( 'Leaving tests_bytes_display_string()' ) ; + is( '1048576.000 PiB', bytes_display_string_bin( 1_180_591_620_717_411_303_424 ), 'bytes_display_string_bin: 1_180_591_620_717_411_303_424 => 1048576.000 PiB' ) ; + note( bytes_display_string_bin( 1_180_591_620_717_411_303_424 ) ) ; + note( bytes_display_string_bin( 3_000_000_000 ) ) ; + note( 'Leaving tests_bytes_display_string_bin()' ) ; return ; } -sub bytes_display_string +sub bytes_display_string_bin { my ( $bytes ) = @_ ; @@ -14128,6 +14668,95 @@ sub bytes_display_string return( $readable_value ) ; } +sub tests_bytes_display_string_dec +{ + note( 'Entering tests_bytes_display_string_dec()' ) ; + + is( 'NA', bytes_display_string_dec( ), 'bytes_display_string_dec: no args => NA' ) ; + is( 'NA', bytes_display_string_dec( undef ), 'bytes_display_string_dec: undef => NA' ) ; + is( 'NA', bytes_display_string_dec( 'blabla' ), 'bytes_display_string_dec: blabla => NA' ) ; + + is( '0 bytes', bytes_display_string_dec( 0 ), 'bytes_display_string_dec: 0 => 0 bytes' ) ; + is( '1 bytes', bytes_display_string_dec( 1 ), 'bytes_display_string_dec: 1 => 1 bytes' ) ; + is( '10 bytes', bytes_display_string_dec( 10 ), 'bytes_display_string_dec: 10 => 10 bytes' ) ; + is( '999 bytes', bytes_display_string_dec( 999 ), 'bytes_display_string_dec: 999 => 999 bytes' ) ; + + is( '1.000 KB', bytes_display_string_dec( 1000 ), 'bytes_display_string_dec: 1000 => 1.000 KB' ) ; + is( '1.001 KB', bytes_display_string_dec( 1001 ), 'bytes_display_string_dec: 1000 => 1.1001 KB' ) ; + + is( '999.999 KB', bytes_display_string_dec( 999_999 ), 'bytes_display_string_dec: 999_999 => 999.999 KB' ) ; + + is( '1.000 MB', bytes_display_string_dec( 1_000_000 ), 'bytes_display_string_dec: 1_000_000 => 1.000 MB' ) ; + is( '1.000 MB', bytes_display_string_dec( 1_000_500 ), 'bytes_display_string_dec: 1_000_500 => 1.000 MB' ) ; + is( '1.001 MB', bytes_display_string_dec( 1_000_501 ), 'bytes_display_string_dec: 1_000_501 => 1.001 MB' ) ; + is( '999.999 MB', bytes_display_string_dec( 999_999_000 ), 'bytes_display_string_dec: 999_999_000 => 999.999 MB' ) ; + is( '999.999 MB', bytes_display_string_dec( 999_999_499 ), 'bytes_display_string_dec: 999_999_499 => 999.999 MB' ) ; + is( '1.000 GB', bytes_display_string_dec( 999_999_500 ), 'bytes_display_string_dec: 999_999_500 => 1.000 GB' ) ; + + is( '1.000 GB', bytes_display_string_dec( 1_000_000_000 ), 'bytes_display_string_dec: 1_000_000_000 => 1.000 GB' ) ; + is( '1.000 GB', bytes_display_string_dec( 1_000_500_000 ), 'bytes_display_string_dec: 1_000_500_000 => 1.000 GB' ) ; + is( '1.001 GB', bytes_display_string_dec( 1_000_500_001 ), 'bytes_display_string_dec: 1_000_501_000 => 1.001 GB' ) ; + is( '999.999 GB', bytes_display_string_dec( 999_999_000_000 ), 'bytes_display_string_dec: 999_999_000_000 => 999.999 GB' ) ; + is( '999.999 GB', bytes_display_string_dec( 999_999_499_999 ), 'bytes_display_string_dec: 999_999_499_999 => 999.999 GB' ) ; + is( '1.000 TB', bytes_display_string_dec( 999_999_500_000 ), 'bytes_display_string_dec: 999_999_500_000 => 1.000 TB' ) ; + + is( '1.000 TB', bytes_display_string_dec( 1_000_000_000_000 ), 'bytes_display_string_dec: 1_000_000_000_000 => 1.000 TB' ) ; + is( '1.000 TB', bytes_display_string_dec( 1_000_500_000_000 ), 'bytes_display_string_dec: 1_000_500_000_000 => 1.000 TB' ) ; + is( '1.001 TB', bytes_display_string_dec( 1_000_500_000_001 ), 'bytes_display_string_dec: 1_000_500_000_000 => 1.000 TB' ) ; + is( '999.999 TB', bytes_display_string_dec( 999_999_000_000_000 ), 'bytes_display_string_dec: 999_999_000_000_000 => 999.999 TB' ) ; + is( '999.999 TB', bytes_display_string_dec( 999_999_499_999_999 ), 'bytes_display_string_dec: 999_999_499_999_999 => 999.999 TB' ) ; + is( '1.000 PB', bytes_display_string_dec( 999_999_500_000_000 ), 'bytes_display_string_dec: 999_999_500_000_000 => 1.000 PB' ) ; + + is( '3.000 GB', bytes_display_string_dec( 3_000_000_000 ), 'bytes_display_string_dec: 3_000_000_000 => 3.000 GB' ) ; + + note( 'Leaving tests_bytes_display_string_dec()' ) ; + return ; +} + +sub bytes_display_string_dec +{ + my ( $bytes ) = @_ ; + + my $readable_value = q{} ; + + if ( ! defined( $bytes ) ) { + return( 'NA' ) ; + } + + if ( not match_number( $bytes ) ) { + return( 'NA' ) ; + } + + SWITCH: { + if ( abs( $bytes ) < ( 1000 ) ) { + $readable_value = mysprintf( '%.0f bytes', $bytes ) ; + last SWITCH ; + } + if ( abs( $bytes ) < ( 1000**2 ) ) { + $readable_value = mysprintf( '%.3f KB', $bytes / 1000 ) ; + last SWITCH ; + } + if ( abs( $bytes ) < ( 999_999_500 ) ) { + $readable_value = mysprintf( '%.3f MB', $bytes / ( 1000**2 ) ) ; + last SWITCH ; + } + if ( abs( $bytes ) < ( 999_999_500_000 ) ) { + $readable_value = mysprintf( '%.3f GB', $bytes / ( 1000**3 ) ) ; + last SWITCH ; + } + if ( abs( $bytes ) < ( 999_999_500_000_000 ) ) { + $readable_value = mysprintf( '%.3f TB', $bytes / ( 1000**4 ) ) ; + last SWITCH ; + } else { + $readable_value = mysprintf( '%.3f PB', $bytes / ( 1000**5 ) ) ; + } + # if you have exabytes (EiB) of email to transfer, you have too much email! + } + #myprint( "$bytes = $readable_value\n" ) ; + + return( $readable_value ) ; +} + sub tests_useheader_suggestion { @@ -14209,10 +14838,10 @@ sub do_and_print_stats myprint( "Messages deleted on host2 : $mysync->{ acc2 }->{ nb_msg_deleted }\n" ) ; myprintf( "Total bytes transferred : %s (%s)\n", $mysync->{total_bytes_transferred}, - bytes_display_string( $mysync->{total_bytes_transferred} ) ) ; + bytes_display_string_bin( $mysync->{total_bytes_transferred} ) ) ; myprintf( "Total bytes skipped : %s (%s)\n", $mysync->{ total_bytes_skipped }, - bytes_display_string( $mysync->{ total_bytes_skipped } ) ) ; + bytes_display_string_bin( $mysync->{ total_bytes_skipped } ) ) ; $timediff ||= 1 ; # No division per 0 myprintf("Message rate : %.1f messages/s\n", $mysync->{nb_msg_transferred} / $timediff ) ; myprintf("Average bandwidth rate : %.1f KiB/s\n", $mysync->{total_bytes_transferred} / $KIBI / $timediff ) ; @@ -14225,7 +14854,7 @@ sub do_and_print_stats myprint( "CPU time and %cpu : $cpu_time sec $cpu_percent %cpu $cpu_percent_global %allcpus\n" ) ; myprintf("Biggest message transferred : %s bytes (%s)\n", $mysync->{ biggest_message_transferred }, - bytes_display_string( $mysync->{ biggest_message_transferred } ) ) ; + bytes_display_string_bin( $mysync->{ biggest_message_transferred } ) ) ; myprint( "Memory/biggest message ratio : $memory_ratio\n" ) ; if ( $mysync->{ foldersizesatend } and $mysync->{ foldersizes } ) { @@ -14235,21 +14864,21 @@ sub do_and_print_stats myprintf("Start difference host2 - host1 : %s messages, %s bytes (%s)\n", $nb_msg_start_diff, $bytes_start_diff, - bytes_display_string( $bytes_start_diff ) ) ; + bytes_display_string_bin( $bytes_start_diff ) ) ; my $nb_msg_end_diff = diff_or_NA( $h2_nb_msg_end, $h1_nb_msg_end ) ; my $bytes_end_diff = diff_or_NA( $h2_bytes_end, $h1_bytes_end ) ; myprintf("Final difference host2 - host1 : %s messages, %s bytes (%s)\n", $nb_msg_end_diff, $bytes_end_diff, - bytes_display_string( $bytes_end_diff ) ) ; + bytes_display_string_bin( $bytes_end_diff ) ) ; } comment_on_final_diff_in_1_not_in_2( $mysync ) ; comment_on_final_diff_in_2_not_in_1( $mysync ) ; myprint( "Detected $mysync->{nb_errors} errors\n\n" ) ; - myprint( $warn_release, "\n" ) ; + myprint( $mysync->{ warn_release }, "\n" ) ; myprint( homepage( ), "\n" ) ; return ; } @@ -14696,7 +15325,7 @@ sub file_to_array if ( ! -e $file ) { return ; } if ( ! -f $file ) { return ; } if ( ! -r $file ) { return ; } - + my @string ; if ( open my $FILE, '<', $file ) @@ -14741,7 +15370,7 @@ sub file_to_string if ( ! -e $file ) { return ; } if ( ! -f $file ) { return ; } if ( ! -r $file ) { return ; } - + return( join q{}, file_to_array( $file ) ) ; } @@ -15236,7 +15865,7 @@ sub tests_cpu_number } is( 4, cpu_number( ), "cpu_number: on i005 (FreeBSD) => 4" ) ; } ; - + SKIP: { if ( ! ( 'petite' eq hostname() ) ) { @@ -15252,7 +15881,7 @@ sub tests_cpu_number } is( 2, cpu_number( ), "cpu_number: on polarhome macosx (Darwin MacOS X 10.7.5 Lion) => 2" ) ; } ; - + SKIP: { if ( ! ( 'pcHPDV7-HP' eq hostname() ) ) { @@ -15260,7 +15889,7 @@ sub tests_cpu_number } is( 2, cpu_number( ), "cpu_number: on pcHPDV7-HP (Windows 7, 64bits) => 2" ) ; } ; - + SKIP: { if ( ! ( 'CUILLERE' eq hostname() ) ) { @@ -15268,7 +15897,7 @@ sub tests_cpu_number } is( 1, cpu_number( ), "cpu_number: on CUILLERE (Windows XP, 32bits) => 1" ) ; } ; - + note( 'Leaving tests_cpu_number()' ) ; return ; @@ -15288,33 +15917,33 @@ sub cpu_number { $cpu_number = $ENV{"NUMBER_OF_PROCESSORS"} ; #myprint( "Number of processors found by env var NUMBER_OF_PROCESSORS: $cpu_number\n" ) ; } - + if ( 'darwin' eq $OSNAME ) { $cpu_number = backtick( "sysctl -n hw.ncpu" ) ; chomp( $cpu_number ) ; #myprint( "Number of processors found by cmd 'sysctl -n hw.ncpu': $cpu_number\n" ) ; } - + if ( 'freebsd' eq $OSNAME ) { $cpu_number = backtick( "sysctl -n kern.smp.cpus" ) ; chomp( $cpu_number ) ; #myprint( "Number of processors found by cmd 'sysctl -n kern.smp.cpus': $cpu_number\n" ) ; } - + if ( 'linux' eq $OSNAME && -e '/proc/cpuinfo' ) { @cpuinfo = file_to_array( '/proc/cpuinfo' ) ; $cpu_number = grep { /^processor/mxs } @cpuinfo ; #myprint( "Number of processors found via /proc/cpuinfo: $cpu_number\n" ) ; } - + if ( defined $cpu_number_forced ) { $cpu_number = $cpu_number_forced ; } - + return( integer_or_1( $cpu_number ) ) ; } @@ -15375,13 +16004,16 @@ sub tests_loadavg { note( 'Entering tests_loadavg()' ) ; - SKIP: { - skip( 'Tests for darwin', 2 ) if ('darwin' ne $OSNAME) ; + skip( 'Tests for darwin', 3 ) if ('darwin' ne $OSNAME) ; is( undef, loadavg( '/noexist' ), 'loadavg: /noexist => undef' ) ; - is_deeply( [ '0.11', '0.22', '0.33' ], - [ loadavg( 'W/t/loadavg.out' ) ], - 'loadavg W/t/loadavg.out => 0.11 0.22 0.33' ) ; + is_deeply( + [ '0.11', '0.22', '0.33' ], + [ loadavg( 'vm.loadavg: { 0.11 0.22 0.33 }' ) ], + 'loadavg: "vm.loadavg: { 0.11 0.22 0.33 }" => 0.11 0.22 0.33' + ) ; + note( join( " ", "loadavg:", loadavg( ) ) ) ; + is( 3, scalar( my @loadavg = loadavg( ) ), 'loadavg: 3 values' ) ; } ; SKIP: { @@ -15399,7 +16031,6 @@ sub tests_loadavg is_deeply( [ 0 ], [ loadavg( ) ], 'loadavg on MSWin32 => 0' ) ; - } ; note( 'Leaving tests_loadavg()' ) ; @@ -15422,7 +16053,6 @@ sub loadavg return ( loadavg_windows( @ARG ) ) ; } return( 'unknown' ) ; - } sub loadavg_linux @@ -15466,24 +16096,25 @@ sub loadavg_freebsd sub loadavg_darwin { - my $file = shift ; + my $line = shift ; # Example of output of command "sysctl vm.loadavg": # vm.loadavg: { 0.15 0.08 0.08 } my $loadavg ; - if ( ! defined $file ) { + if ( ! defined $line ) { eval { - $loadavg = `/usr/sbin/sysctl vm.loadavg` ; + # $loadavg = `/usr/sbin/sysctl vm.loadavg` ; + $loadavg = `LANG= /usr/sbin/sysctl vm.loadavg` ; #myprint( "LOADAVG DARWIN: $loadavg\n" ) ; } ; if ( $EVAL_ERROR ) { myprint( "[$EVAL_ERROR]\n" ) ; return ; } }else{ - $loadavg = firstline( $file ) or return ; + $loadavg = $line ; } my ( $avg_1_min, $avg_5_min, $avg_15_min ) = $loadavg =~ /vm\.loadavg\s*[:=]\s*\{?\s*(\d+\.?\d*)\s+(\d+\.?\d*)\s+(\d+\.?\d*)/mxs ; - $sync->{ debug } and myprint( "System load: $avg_1_min $avg_5_min $avg_15_min\n" ) ; + #$sync->{ debug } and myprint( "System load: $avg_1_min $avg_5_min $avg_15_min\n" ) ; return ( $avg_1_min, $avg_5_min, $avg_15_min ) ; } @@ -15592,7 +16223,7 @@ sub tests_cpu_time my $mysync = { } ; $mysync->{ debug } = 1 ; - ok( is_number( cpu_time( $mysync ) ), 'cpu_time: {} => a number' ) ; + ok( is_number( cpu_time( $mysync ) ), 'cpu_time: {} => a number' ) ; note( 'Leaving tests_cpu_time()' ) ; return ; @@ -15601,15 +16232,15 @@ sub tests_cpu_time sub cpu_time { my $mysync = shift ; - + my @cpu_times = times ; if ( ! @cpu_times ) { return ; } - + my $cpu_time = 0 ; # last element is the sum of all elements $cpu_time = ( map { $cpu_time += $_ } @cpu_times )[ -1 ] ; - $mysync->{ debug } and myprint( join(' + ', @cpu_times), " = $cpu_time\n" ) ; - + my $cpu_time_round = mysprintf( '%.2f', $cpu_time ) ; + $mysync->{ debug } and myprint( join(' + ', @cpu_times), " = $cpu_time ~ $cpu_time_round\n" ) ; return $cpu_time ; } @@ -15644,9 +16275,9 @@ sub cpu_percent my $cpu_percent = 0 ; $cpu_percent = mysprintf( '%.1f', 100 * $cpu_time / $timediff ) ; $mysync->{ debug } and myprint( "cpu_percent: $cpu_percent \n" ) ; - + return $cpu_percent ; - + } sub tests_cpu_percent_global @@ -15666,7 +16297,7 @@ sub tests_cpu_percent_global } is( '25.0', cpu_percent_global( $mysync, 100 ), 'cpu_percent_global: {} 100 => 25 on host i005' ) ; } ; - + SKIP: { if ( ! ( 'petite' eq hostname() ) ) { @@ -15683,13 +16314,13 @@ sub cpu_percent_global { my $mysync = shift ; my $cpu_percent = shift || 0 ; - + my $cpu_number = cpu_number( ) ; - + my $cpu_percent_global ; $cpu_percent_global = mysprintf( '%.1f', $cpu_percent / $cpu_number ) ; $mysync->{ debug } and myprint( "cpu_percent_global: $cpu_percent_global \n" ) ; - + return( $cpu_percent_global ) ; } @@ -15720,7 +16351,6 @@ sub tests_memory_stress sub memory_stress { - my $total_ram_in_MB = Sys::MemInfo::get("totalmem") / ( $KIBI * $KIBI ) ; my $i = 1 ; @@ -15728,13 +16358,13 @@ sub memory_stress while ( $i < $total_ram_in_MB / 1.7 ) { $a .= "A" x 1000_000; $i++ } ; myprintf("Stress memory consumption after: %.1f MiB\n", memory_consumption( ) / $KIBI / $KIBI ) ; return ; - } sub tests_memory_consumption { note( 'Entering tests_memory_consumption()' ) ; + note( "memory_consumption: " . memory_consumption() . " bytes aka " . bytes_display_string_dec( memory_consumption() ) ) ; like( memory_consumption( ), qr{\d+}xms,'memory_consumption no args') ; like( memory_consumption( 1 ), qr{\d+}xms,'memory_consumption 1') ; like( memory_consumption( $PROCESS_ID ), qr{\d+}xms,"memory_consumption_of_pids $PROCESS_ID") ; @@ -15743,7 +16373,6 @@ sub tests_memory_consumption like( memory_consumption_ratio(1), qr{\d+}xms, 'memory_consumption_ratio 1' ) ; like( memory_consumption_ratio(10), qr{\d+}xms, 'memory_consumption_ratio 10' ) ; - like( memory_consumption(), qr{\d+}xms, "memory_consumption\n" ) ; note( 'Leaving tests_memory_consumption()' ) ; return ; @@ -15774,23 +16403,36 @@ sub memory_consumption_of_pids my @val ; if ( ( 'MSWin32' eq $OSNAME ) or ( 'cygwin' eq $OSNAME ) ) { @val = memory_consumption_of_pids_win32( @pid ) ; - }else{ + } + elsif ( 'darwin' eq $OSNAME ) + { + @val = memory_consumption_of_pids_mac( @pid ) ; + } + else + { # Unix my @ps = qx{ ps -o vsz -p @pid } ; - #myprint( "ps: @ps" ) ; - - # Use IPC::Open3 from perlcrit -3 - # But it stalls on Darwin, I don't understand why! - #my @ps = backtick( "ps -o vsz -p @pid" ) ; - #myprint( "ps: @ps" ) ; - - shift @ps; # First line is column name "VSZ" - chomp @ps; + shift @ps ; # First line is column name "VSZ" + chomp @ps ; # convert to octets @val = map { $_ * $KIBI } @ps ; } - $sync->{ debug } and myprint( "@val\n" ) ; + return( @val ) ; +} + + +sub memory_consumption_of_pids_mac +{ + my @pid = @_ ; + # Use IPC::Open3 from perlcrit -3 + # But it stalls on Darwin, I don't understand why! + #my @ps = backtick( "ps -o rss -p @pid" ) ; + #myprint( "ps: @ps" ) ; + my @ps = qx{ ps -o rss -p @pid } ; + shift @ps ; # First line is column name "RSS" + chomp @ps ; + my @val = map { $_ * $KIBI } @ps ; return( @val ) ; } @@ -16439,7 +17081,7 @@ sub comment_on_final_diff_in_2_not_in_1 " among ", $nb_identified_h2_messages, " identified messages in host2 that are not on host1.", - " Use --delete2 and sync again to delete them and have a strict sync.\n" + " Use --delete2 and sync again to delete them and have a strict sync.\n" ) ; } return ; @@ -17114,6 +17756,24 @@ sub max_line_length return( $max ) ; } +sub set_checknoabletosearch +{ + my $mysync = shift @ARG ; + if ( defined $mysync->{ checknoabletosearch } ) + { + return ; + } + elsif ( $mysync->{ justfolders } ) + { + $mysync->{ checknoabletosearch } = 0 ; + } + else + { + $mysync->{ checknoabletosearch } = 1 ; + } + return ; +} + sub tests_setlogfile { @@ -17215,7 +17875,7 @@ sub setlogfile # When aborting another process the log file name finishes with "_abort.txt" my $abort_suffix = ( $mysync->{ abort } ) ? '_abort' : q{} ; - + # When acting as a proxy the log file name finishes with "_remote.txt" # proxy mode is not done in imapsync, it is done by proximapsync my $remote_suffix = ( $mysync->{ remote } ) ? '_remote' : q{} ; @@ -17313,13 +17973,13 @@ sub tests_localtimez sub localtimez { my $time = shift ; - + $time = defined( $time ) ? $time : time ; - + my $datetimestr = POSIX::strftime( '%A %e %B %Y-%m-%d %H:%M:%S %z %Z', localtime( $time ) ) ; #myprint( "$datetimestr\n" ) ; - return $datetimestr ; + return $datetimestr ; } @@ -17761,6 +18421,7 @@ sub gmail12 $skipcrossduplicates = ( defined $skipcrossduplicates ) ? $skipcrossduplicates : 0 ; $mysync->{ synclabels } = ( defined $mysync->{ synclabels } ) ? $mysync->{ synclabels } : 1 ; $mysync->{ resynclabels } = ( defined $mysync->{ resynclabels } ) ? $mysync->{ resynclabels } : 1 ; + push @useheader, 'X-Gmail-Received', 'Message-Id' ; push @exclude, '\[Gmail\]$' ; push @folderlast, '[Gmail]/All Mail' ; return ; @@ -17785,7 +18446,7 @@ sub gmail1 return ; } -sub gmail2 +sub gmail2 { my $mysync = shift ; # Gmail at host2 @@ -18610,8 +19271,8 @@ sub setvalfromcgikey my ( $mysync, $mycgi, $key, $val ) = @ARG ; my $badthings = 0 ; - - + + my ( $name, $type, $struct ) ; if ( $key !~ m/^([\w\d\|]+)([=:][isf])?([\+!\@\%])?$/mxs ) { @@ -18624,7 +19285,7 @@ sub setvalfromcgikey $type = $2 ; # = or : followed by i or s or f $struct = $3 ; # + or ! or @ or % } - + if ( ( $struct || q{} ) eq '+' ) { ${$val} = $mycgi->param( $name ) ; # "Incremental" integer @@ -18638,7 +19299,7 @@ sub setvalfromcgikey { setvalfromhash( $val, $type, @values ) ; } - else + else { setvalfromlist( $mysync, $val, $name, $type, $struct, @values ) ; } @@ -18647,7 +19308,7 @@ sub setvalfromcgikey { setvalfromcheckbox( $mysync, $mycgi, $key, $name, $val ) ; } - + return $badthings ; } @@ -18681,7 +19342,7 @@ sub setvalfromlist else { } - + return ; } sub setvalfromhash @@ -18708,11 +19369,11 @@ sub setvalfromhash { %{ ${$val} } = %values ; } - else + else { %{$val} = %values ; } - + return ; } @@ -18720,7 +19381,7 @@ sub setvalfromhash sub setvalfromcheckbox { my ( $mysync, $mycgi, $key, $name, $val ) = @ARG ; - + # Checkbox # --noname is set by name=0 or name= my $value = $mycgi->param( $name ) ; @@ -18774,7 +19435,7 @@ sub myGetOptions $badthings += setvalfromcgikey( $mysync, $mycgi, $key, $val ) ; } - + if ( $badthings ) { return ; # undef or () } @@ -18785,6 +19446,138 @@ sub myGetOptions +sub tests_get_options_extra +{ + note( 'Entering tests_get_options_extra()' ) ; + + is( undef, get_options_extra( ), 'get_options_extra: no args => undef' ) ; + + my $mysync = { } ; + is( undef, get_options_extra( $mysync ), 'get_options_extra: undef => undef' ) ; + + my $cwd_save = getcwd( ) ; + + ok( (-d 'W/tmp/tests/options_extra/' or mkpath( 'W/tmp/tests/options_extra/' )), 'get_options_extra: mkpath W/tmp/tests/options_extra/' ) ; + + chdir 'W/tmp/tests/options_extra/' ; + + is( '--debugimap1', string_to_file( '--debugimap1', 'options_extra.txt' ), 'get_options_extra: string_to_file filling options_extra.txt with --debugimap1' ) ; + + is( '--debugimap1', file_to_string( 'options_extra.txt' ), 'get_options_extra: reading options_extra.txt is --debugimap1' ) ; + + is( '', get_options_extra( $mysync ), 'get_options_extra: --debugimap1 in options_extra.txt => nothing left, empty string return' ) ; + + is( 1, $mysync->{ acc1 }->{ debugimap }, 'get_options_extra: --debugimap1 in options_extra.txt => ok, acc1->debugimap = 1' ) ; + + is( '--tls1 proutcaca', string_to_file( '--tls1 proutcaca', 'options_extra.txt' ), 'get_options_extra: string_to_file filling options_extra.txt with --tls1 proutcaca' ) ; + + is( 'proutcaca', get_options_extra( $mysync ), 'get_options_extra: --tls1 proutcaca in options_extra.txt => proutcaca left, proutcaca return' ) ; + + chdir $cwd_save ; + + note( 'Leaving tests_get_options_extra()' ) ; + return ; +} + +sub get_options_extra +{ + my $mysync = shift @ARG ; + + if ( ! defined $mysync ) { return ; } + + if ( -f -r 'options_extra.txt' ) + { + my $cwd = getcwd( ) ; + my $string = firstline( 'options_extra.txt' ) ; + my $rest = get_options_from_string( $mysync, $string ) ; + output( $mysync, "Reading extra options from file options_extra.txt (cwd: $cwd) : $string\n" ) ; + return $rest ; + } + else + { + return ; + } +} + + +sub tests_get_options_from_string +{ + note( 'Entering tests_get_options_from_string()' ) ; + + is( undef, get_options_from_string( ), 'get_options_from_string: no args => undef' ) ; + my $mysync = { } ; + is( undef, get_options_from_string( $mysync ), 'get_options_from_string: undef => undef' ) ; + + is( '', get_options_from_string( $mysync, '--debugimap1' ), + 'get_options_from_string: --debugimap1 => ok, nothing left, empty string return' ) ; + is( 1, $mysync->{ acc1 }->{ debugimap }, 'get_options_from_string: --debugimap1 => ok, acc1->debugimap = 1' ) ; + + $mysync = { } ; # reset + is( 'caca', get_options_from_string( $mysync, '--debugimap1 caca' ), + 'get_options_from_string: --debugimap1 caca => ok, caca left, caca return' ) ; + is( 1, $mysync->{ acc1 }->{ debugimap }, 'get_options_from_string: --debugimap1 => ok, acc1->debugimap = 1' ) ; + + is( 'popo roro', get_options_from_string( $mysync, '--debugimap2 popo roro' ), + 'get_options_from_string: --debugimap1 popo roro => ok, popo roro left, popo roro return' ) ; + is( 1, $mysync->{ acc2 }->{ debugimap }, 'get_options_from_string: --debugimap2 popo roro => ok, acc2->debugimap = 1' ) ; + is( 1, $mysync->{ acc1 }->{ debugimap }, 'get_options_from_string: acc1->debugimap = 1 still' ) ; + + is( '', get_options_from_string( $mysync, '--nodebugimap1 --debugflags --errorsmax 2' ), + 'get_options_from_string: --nodebugimap1 --debugflags --errorsmax 2 => ok, empty string return' ) ; + + is( 0, $mysync->{ acc1 }->{ debugimap }, 'get_options_from_string: acc1->debugimap = 0 now' ) ; + is( 1, $debugflags, 'get_options_from_string: debugflags = 1 now' ) ; + is( 2, $mysync->{ errorsmax }, 'get_options_from_string: mysync->errorsmax = 2 now' ) ; + + is( '', get_options_from_string( $mysync, '--folder "IN BOX" --folder JOE' ), + 'get_options_from_string: --folder "IN BOX" --folder JOE => ok, empty string return' ) ; + + is_deeply( [ 'IN BOX', 'JOE' ], [@{$mysync->{ folder }}], 'get_options_from_string: "IN BOX" "JOE"' ) ; + + is( '', get_options_from_string( $mysync, '--debugflags --koko' ), + 'get_options_from_string: --debugflags --koko => ok, empty string return, with "Unknown option: koko" on STDERR' ) ; + + note( 'Leaving tests_get_options_from_string()' ) ; + return ; +} + +sub get_options_from_string +{ + my $mysync = shift @ARG ; + my $mystring = shift @ARG ; + + if ( ! defined $mystring ) { return ; } + + my ( $ret, $args ) = Getopt::Long::GetOptionsFromString( $mystring, + 'debugimap!' => \$mysync->{ debugimap }, + 'debugimap1!' => \$mysync->{ acc1 }->{ debugimap }, + 'debugimap2!' => \$mysync->{ acc2 }->{ debugimap }, + 'debugflags!' => \$debugflags, + 'debugsleep=f' => \$mysync->{ debugsleep }, + 'errorsmax=i' => \$mysync->{ errorsmax }, + 'folder=s@' => \$mysync->{ folder }, + 'timeout=f' => \$mysync->{ timeout }, + 'timeout1=f' => \$mysync->{ acc1 }->{ timeout }, + 'timeout2=f' => \$mysync->{ acc2 }->{ timeout }, + 'keepalive1!' => \$mysync->{ acc1 }->{ keepalive }, + 'keepalive2!' => \$mysync->{ acc2 }->{ keepalive }, + 'reconnectretry1=i' => \$mysync->{ acc1 }->{ reconnectretry }, + 'reconnectretry2=i' => \$mysync->{ acc2 }->{ reconnectretry }, + 'ssl1!' => \$mysync->{ ssl1 }, + 'ssl2!' => \$mysync->{ ssl2 }, + 'tls1!' => \$mysync->{ tls1 }, + 'tls2!' => \$mysync->{ tls2 }, + 'compress1!' => \$mysync->{ acc1 }->{ compress }, + 'compress2!' => \$mysync->{ acc2 }->{ compress }, + ) ; + my $left = join( ' ', @$args ) ; + return $left ; +} + + + + + sub tests_get_options_cgi_context { @@ -18922,6 +19715,8 @@ sub get_options_cgi 'ssl2!' => \$mysync->{ ssl2 }, 'tls1!' => \$mysync->{ tls1 }, 'tls2!' => \$mysync->{ tls2 }, + 'compress1!' => \$mysync->{ acc1 }->{ compress }, + 'compress2!' => \$mysync->{ acc2 }->{ compress }, 'justbanner!' => \$mysync->{ justbanner }, 'justlogin!' => \$mysync->{ justlogin }, 'justconnect!' => \$mysync->{ justconnect }, @@ -18957,7 +19752,7 @@ sub get_options_cgi 'syncduplicates!' => \$mysync->{ syncduplicates }, 'log!' => \$mysync->{ log }, 'loglogfile!' => \$mysync->{ loglogfile }, - + # f1f2h=s% could be removed but # tests_get_options_cgi() should be split before @@ -18991,8 +19786,8 @@ sub get_options_cmd \@arguments, 'debug!' => \$mysync->{ debug }, 'debuglist!' => \$debuglist, - 'debugcontent!' => \$debugcontent, - 'debugsleep=f' => \$mysync->{debugsleep}, + 'debugcontent!' => \$mysync->{ debugcontent }, + 'debugsleep=f' => \$mysync->{ debugsleep }, 'debugflags!' => \$debugflags, 'debugimap!' => \$mysync->{ debugimap }, 'debugimap1!' => \$mysync->{ acc1 }->{ debugimap }, @@ -19012,10 +19807,10 @@ sub get_options_cmd 'host1=s' => \$mysync->{ host1 }, 'host2=s' => \$mysync->{ host2 }, - 'port1=i' => \$mysync->{port1}, - 'port2=i' => \$mysync->{port2}, - 'inet4|ipv4' => \$mysync->{inet4}, - 'inet6|ipv6' => \$mysync->{inet6}, + 'port1=i' => \$mysync->{ port1 }, + 'port2=i' => \$mysync->{ port2 }, + 'inet4|ipv4' => \$mysync->{ inet4 }, + 'inet6|ipv6' => \$mysync->{ inet6 }, 'user1=s' => \$mysync->{ user1 }, 'user2=s' => \$mysync->{ user2 }, 'gmail1' => \$mysync->{gmail1}, @@ -19109,7 +19904,6 @@ sub get_options_cmd 'justbanner!' => \$mysync->{ justbanner }, 'justfolders!'=> \$mysync->{ justfolders }, 'justfoldersizes!' => \$mysync->{ justfoldersizes }, - 'fast!' => \$fast, 'version' => \$mysync->{version}, 'help' => \$help, 'timeout=f' => \$mysync->{timeout}, @@ -19140,6 +19934,10 @@ sub get_options_cmd 'authuser2=s' => \$mysync->{ acc2 }->{ authuser }, 'proxyauth1' => \$mysync->{ acc1 }->{ proxyauth }, 'proxyauth2' => \$mysync->{ acc2 }->{ proxyauth }, + 'compress1!' => \$mysync->{ acc1 }->{ compress }, + 'compress2!' => \$mysync->{ acc2 }->{ compress }, + 'keepalive1!' => \$mysync->{ acc1 }->{ keepalive }, + 'keepalive2!' => \$mysync->{ acc2 }->{ keepalive }, 'split1=i' => \$split1, 'split2=i' => \$split2, 'buffersize=i' => \$buffersize, @@ -19191,7 +19989,7 @@ sub get_options_cmd 'logfile=s' => \$mysync->{logfile}, 'logdir=s' => \$mysync->{logdir}, 'errorsmax=i' => \$mysync->{errorsmax}, - 'errorsdump!' => \$mysync->{errorsdump}, + 'errorsdump!' => \$mysync->{ errorsdump }, 'fetch_hash_set=s' => \$fetch_hash_set, 'automap!' => \$mysync->{automap}, 'justautomap!' => \$mysync->{justautomap}, @@ -19204,7 +20002,7 @@ sub get_options_cmd 'checknoabletosearch!' => \$mysync->{checknoabletosearch}, 'syncduplicates!' => \$mysync->{ syncduplicates }, 'dockercontext!' => \$mysync->{ dockercontext }, - + ) ; #myprint( Data::Dumper->Dump( [ $mysync ] ) ) ; @@ -19294,6 +20092,7 @@ sub get_options $ret = get_options_cmd( $mysync, @arguments ) ; } ; #myprint( "2 mysync: ", Data::Dumper->Dump( [ $mysync ] ) ) ; + foreach my $key ( sort keys %{ $mysync } ) { if ( ! defined $mysync->{$key} ) { delete $mysync->{$key} ; @@ -19308,6 +20107,31 @@ sub get_options } +sub tests_infos +{ + note( 'Entering tests_infos()' ) ; + note( "OSNAME=$OSNAME" ) ; + note( "hostname=". hostname() ) ; + note( "cwd=" . getcwd( ) ) ; + note( "PROGRAM_NAME=$PROGRAM_NAME" ) ; + my $stat = stat("$PROGRAM_NAME") ; + my $perms = sprintf( "%04o\n", $stat->mode & oct($PERMISSION_FILTER) ) ; + note( "permissions=$perms" ) ; + note( "PROCESS_ID=$PROCESS_ID" ) ; + note( "REAL_USER_ID=$REAL_USER_ID" ) ; + note( "EFFECTIVE_USER_ID=$EFFECTIVE_USER_ID" ) ; + note( "context: " . imapsync_context( $sync ) ) ; + note( "memory_consumption: " . memory_consumption() . " bytes aka " . bytes_display_string_dec( memory_consumption() ) ) ; + cpu_number + note( "cpu_number: " . cpu_number() ) ; + note( $sync->{rcs} ) ; + + note( 'Leaving tests_infos()' ) ; + return ; +} + + + sub condition_to_leave_after_tests { my $mysync = shift ; @@ -19316,9 +20140,9 @@ sub condition_to_leave_after_tests return 0 ; } - if ( $mysync->{ tests } - or $mysync->{ testsdebug } - or $mysync->{ testsunit } + if ( $mysync->{ tests } + or $mysync->{ testsdebug } + or $mysync->{ testsunit } ) { return 1 ; @@ -19467,8 +20291,9 @@ sub testsdebug #tests_kill_zero( ) ; #tests_connect_socket( ) ; #tests_probe_imapssl( ) ; - tests_cpu_number( ) ; - tests_mailimapclient_connect( ) ; + #tests_cpu_number( ) ; + #tests_mailimapclient_connect( ) ; + tests_loadavg( ) ; #tests_always_fail( ) ; note( 'Leaving testsdebug()' ) ; @@ -19524,7 +20349,8 @@ sub tests tests_time_remaining( ) ; tests_decompose_regex( ) ; tests_backtick( ) ; - tests_bytes_display_string( ) ; + tests_bytes_display_string_bin( ) ; + tests_bytes_display_string_dec( ) ; tests_header_line_normalize( ) ; tests_fix_Inbox_INBOX_mapping( ) ; tests_max_line_length( ) ; @@ -19666,6 +20492,14 @@ sub tests tests_cpu_percent_global( ) ; tests_flags_for_host2( ) ; tests_under_docker_context( ) ; + tests_exit_value( ) ; + tests_comment_of_error_type( ) ; + tests_debugcontent( ) ; + tests_compress_ssl( ) ; + tests_compress( ) ; + tests_get_options_extra( ) ; + tests_get_options_from_string( ) ; + tests_infos( ) ; #tests_resolv( ) ; # Those three are for later use, when webserver will be inside imapsync @@ -19675,7 +20509,7 @@ sub tests #tests_kill_zero( ) ; #tests_always_fail( ) ; - done_testing( 1742 ) ; + done_testing( 1860 ) ; note( 'Leaving tests()' ) ; } return ; @@ -19698,6 +20532,6 @@ sub tests_template sub template { my $mysync = shift @ARG ; - + return ; } diff --git a/data/Dockerfiles/dovecot/syslog-ng-redis_slave.conf b/data/Dockerfiles/dovecot/syslog-ng-redis_slave.conf index f6905092..ea2bcfbf 100644 --- a/data/Dockerfiles/dovecot/syslog-ng-redis_slave.conf +++ b/data/Dockerfiles/dovecot/syslog-ng-redis_slave.conf @@ -1,4 +1,4 @@ -@version: 3.19 +@version: 3.28 @include "scl.conf" options { chain_hostnames(off); diff --git a/data/Dockerfiles/dovecot/syslog-ng.conf b/data/Dockerfiles/dovecot/syslog-ng.conf index bdaca9cb..2ee4f624 100644 --- a/data/Dockerfiles/dovecot/syslog-ng.conf +++ b/data/Dockerfiles/dovecot/syslog-ng.conf @@ -1,4 +1,4 @@ -@version: 3.19 +@version: 3.28 @include "scl.conf" options { chain_hostnames(off); diff --git a/data/Dockerfiles/olefy/Dockerfile b/data/Dockerfiles/olefy/Dockerfile index af156d35..a1a42482 100644 --- a/data/Dockerfiles/olefy/Dockerfile +++ b/data/Dockerfiles/olefy/Dockerfile @@ -8,9 +8,9 @@ RUN apk add --virtual .build-deps gcc musl-dev python3-dev libffi-dev openssl-de && apk add --update --no-cache python3 py3-pip openssl tzdata libmagic \ && pip3 install --upgrade pip \ && pip3 install --upgrade asyncio python-magic \ - && pip3 install --upgrade https://github.com/HeinleinSupport/oletools/archive/master.zip \ + && pip3 install --upgrade https://github.com/decalage2/oletools/archive/master.zip \ && apk del .build-deps -# && sed -i 's/decompress_stream(bytearray(compressed_code))/bytes2str(decompress_stream(bytearray(compressed_code)))/g' /usr/lib/python3.8/site-packages/oletools/olevba.py +# && sed -i 's/template_injection_detected = True/template_injection_detected = False/g' /usr/lib/python3.9/site-packages/oletools/olevba.py ADD olefy.py /app/ diff --git a/data/Dockerfiles/rspamd/Dockerfile b/data/Dockerfiles/rspamd/Dockerfile index ee08f8d2..23fcbb3f 100644 --- a/data/Dockerfiles/rspamd/Dockerfile +++ b/data/Dockerfiles/rspamd/Dockerfile @@ -21,7 +21,8 @@ RUN apt-get update && apt-get install -y \ && apt-get clean \ && mkdir -p /run/rspamd \ && chown _rspamd:_rspamd /run/rspamd \ - && echo 'alias ll="ls -la --color"' >> ~/.bashrc + && echo 'alias ll="ls -la --color"' >> ~/.bashrc \ + && sed -i 's/#analysis_keyword_table > 0/analysis_cat_table.macro_exist == "M"/g' /usr/share/rspamd/lualib/lua_scanners/oletools.lua COPY settings.conf /etc/rspamd/settings.conf COPY metadata_exporter.lua /usr/share/rspamd/plugins/metadata_exporter.lua diff --git a/data/assets/nextcloud/nextcloud.conf b/data/assets/nextcloud/nextcloud.conf index e143a791..3755c4a7 100644 --- a/data/assets/nextcloud/nextcloud.conf +++ b/data/assets/nextcloud/nextcloud.conf @@ -47,6 +47,14 @@ server { return 301 $client_req_scheme_nc://$host/remote.php/dav; } + location = /.well-known/webfinger { + return 301 $client_req_scheme_nc://$host/index.php/.well-known/webfinger; + } + + location = /.well-known/nodeinfo { + return 301 $client_req_scheme_nc://$host/index.php/.well-known/nodeinfo; + } + location ^~ /.well-known/acme-challenge/ { default_type "text/plain"; root /web; diff --git a/data/conf/phpfpm/php-conf.d/opcache-recommended.ini b/data/conf/phpfpm/php-conf.d/opcache-recommended.ini index 104f2425..3c51e11b 100644 --- a/data/conf/phpfpm/php-conf.d/opcache-recommended.ini +++ b/data/conf/phpfpm/php-conf.d/opcache-recommended.ini @@ -1,6 +1,6 @@ opcache.enable=1 opcache.enable_cli=1 -opcache.interned_strings_buffer=8 +opcache.interned_strings_buffer=16 opcache.max_accelerated_files=10000 opcache.memory_consumption=128 opcache.save_comments=1 diff --git a/data/web/lang/lang.cs.json b/data/web/lang/lang.cs.json index 21efa06d..dd7a6826 100644 --- a/data/web/lang/lang.cs.json +++ b/data/web/lang/lang.cs.json @@ -495,7 +495,7 @@ "dns_records": "DNS zĂĄznamy", "dns_records_24hours": "UpozorněnĂ­: ZměnĂĄm v systĂ©mu DNS mĆŻĆŸe trvat aĆŸ 24 hodin, neĆŸ se zde sprĂĄvně zobrazĂ­ jejich aktuĂĄlnĂ­ stav. MĆŻĆŸete zde snadno zjistit, jak nastavit DNS zĂĄznamy a zda jsou vĆĄechny zĂĄznamy sprĂĄvně uloĆŸeny.", "dns_records_data": "SprĂĄvnĂœ zĂĄznam", - "dns_records_docs": "Pƙečtěte si prosĂ­m dokumentaci.", + "dns_records_docs": "Pƙečtěte si prosĂ­m dokumentaci.", "dns_records_name": "NĂĄzev", "dns_records_status": "SoučasnĂœ stav", "dns_records_type": "Typ", diff --git a/data/web/lang/lang.da.json b/data/web/lang/lang.da.json index fc03ec5c..abd25c51 100644 --- a/data/web/lang/lang.da.json +++ b/data/web/lang/lang.da.json @@ -457,7 +457,7 @@ "cname_from_a": "VĂŠrdi afledt af A / AAAA-post. Dette understĂžttes, sĂ„ lĂŠnge posten peger pĂ„ den korrekte ressource.", "dns_records": "DNS-poster", "dns_records_24hours": "BemĂŠrk, at ĂŠndringer, der foretages i DNS, kan tage op til 24 timer for at fĂ„ deres aktuelle status korrekt reflekteret pĂ„ denne side. Det er beregnet som en mĂ„de for dig let at se, hvordan du konfigurerer dine DNS-poster og kontrollere, om alle dine poster er korrekt gemt i DNS.", - "dns_records_docs": "Se ogsĂ„ dokumentationen.", + "dns_records_docs": "Se ogsĂ„ dokumentationen.", "dns_records_data": "Korrekte data", "dns_records_name": "Navn", "dns_records_status": "NuvĂŠrende tilstand", diff --git a/data/web/lang/lang.de.json b/data/web/lang/lang.de.json index c38d49b0..cd7911a1 100644 --- a/data/web/lang/lang.de.json +++ b/data/web/lang/lang.de.json @@ -496,7 +496,7 @@ "dns_records": "DNS-EintrĂ€ge", "dns_records_24hours": "Bitte beachten Sie, dass es bis zu 24 Stunden dauern kann, bis Änderungen an Ihren DNS-EintrĂ€gen als aktueller Status auf dieser Seite dargestellt werden. Diese Seite ist nur als Hilfsmittel gedacht, um die korrekten Werte fĂŒr DNS-EintrĂ€ge anzuzeigen und zu ĂŒberprĂŒfen, ob die Daten im DNS hinterlegt sind.", "dns_records_data": "Korrekte Daten", - "dns_records_docs": "Die Online-Dokumentation enthĂ€lt weitere Informationen zur DNS-Konfiguration.", + "dns_records_docs": "Die Online-Dokumentation enthĂ€lt weitere Informationen zur DNS-Konfiguration.", "dns_records_name": "Name", "dns_records_status": "Aktueller Status", "dns_records_type": "Typ", diff --git a/data/web/lang/lang.en.json b/data/web/lang/lang.en.json index 10410ba4..dd76ccab 100644 --- a/data/web/lang/lang.en.json +++ b/data/web/lang/lang.en.json @@ -496,7 +496,7 @@ "dns_records": "DNS Records", "dns_records_24hours": "Please note that changes made to DNS may take up to 24 hours to correctly have their current state reflected on this page. It is intended as a way for you to easily see how to configure your DNS records and to check whether all your records are correctly stored in DNS.", "dns_records_data": "Correct Data", - "dns_records_docs": "Please also consult the documentation.", + "dns_records_docs": "Please also consult the documentation.", "dns_records_name": "Name", "dns_records_status": "Current State", "dns_records_type": "Type", diff --git a/data/web/lang/lang.es.json b/data/web/lang/lang.es.json index 87be8b4d..098dfa2c 100644 --- a/data/web/lang/lang.es.json +++ b/data/web/lang/lang.es.json @@ -18,7 +18,8 @@ "spam_score": "PuntuaciĂłn de spam", "syncjobs": "Trabajos de sincronizaciĂłn", "tls_policy": "PĂłliza de TLS", - "unlimited_quota": "Cuota ilimitada para buzones" + "unlimited_quota": "Cuota ilimitada para buzones", + "app_passwds": "Gestionar las contraseñas de aplicaciones" }, "add": { "activate_filter_warn": "Todos los demĂĄs filtros se desactivarĂĄn cuando este filtro se active.", diff --git a/data/web/lang/lang.fr.json b/data/web/lang/lang.fr.json index 32c5330d..085240ee 100644 --- a/data/web/lang/lang.fr.json +++ b/data/web/lang/lang.fr.json @@ -467,7 +467,7 @@ "cname_from_a": "Valeur dĂ©rivĂ©e de l’enregistrement A/AAAA. Ceci est supportĂ© tant que l’enregistrement indique la bonne ressource.", "dns_records": "Enregistrements DNS", "dns_records_24hours": "Veuillez noter que les modifications apportĂ©es au DNS peuvent prendre jusqu’à 24 heures pour que leurs Ă©tats actuels soient correctement reflĂ©tĂ©s sur cette page. Il est conçu comme un moyen pour vous de voir facilement comment configurer vos enregistrements DNS et de vĂ©rifier si tous vos enregistrements sont correctement stockĂ©s dans les DNS.", - "dns_records_docs": "Veuillez Ă©galement consulter la documentation.", + "dns_records_docs": "Veuillez Ă©galement consulter la documentation.", "dns_records_data": "DonnĂ©es correcte", "dns_records_name": "Nom", "dns_records_status": "Etat courant", diff --git a/data/web/lang/lang.it.json b/data/web/lang/lang.it.json index ef901474..aa1e4eb0 100644 --- a/data/web/lang/lang.it.json +++ b/data/web/lang/lang.it.json @@ -496,7 +496,7 @@ "dns_records": "Record DNS", "dns_records_24hours": "Tieni presente che le modifiche apportate ai record DNS potrebbero richiedere fino a 24 ore per poter essere visualizzate correttamente in questa pagina. Tutto ciĂČ Ăš da intendersi come un modo per voi di vedere come configurare i record DNS e per controllare se tutti i record DNS sono stati inseriti correttamente.", "dns_records_data": "Dati corretti", - "dns_records_docs": "Si prega di consultare anche la documentazione.", + "dns_records_docs": "Si prega di consultare anche la documentazione.", "dns_records_name": "Nome", "dns_records_status": "Stato attuale", "dns_records_type": "Tipo", diff --git a/data/web/lang/lang.nl.json b/data/web/lang/lang.nl.json index 4628aacf..8c28fa0a 100644 --- a/data/web/lang/lang.nl.json +++ b/data/web/lang/lang.nl.json @@ -465,7 +465,7 @@ "cname_from_a": "Waarde afgeleid van een A- of AAAA-vermelding.", "dns_records": "DNS-configuratie", "dns_records_24hours": "Houd er rekening mee dat wijzigingen aan DNS tot wel 24 uur in beslag kunnen nemen voordat ze op deze pagina worden weergegeven. Deze informatie is bedoeld om gemakkelijk te bekijken of de DNS-configuratie aan de eisen voldoet.", - "dns_records_docs": "Raadpleeg ook de documentatie.", + "dns_records_docs": "Raadpleeg ook de documentatie.", "dns_records_data": "Correcte gegevens", "dns_records_name": "Naam", "dns_records_status": "Huidige staat", diff --git a/data/web/lang/lang.ro.json b/data/web/lang/lang.ro.json index 0d987aa5..90e8f15d 100644 --- a/data/web/lang/lang.ro.json +++ b/data/web/lang/lang.ro.json @@ -495,7 +495,7 @@ "cname_from_a": "Valoare derivată din Ăźnregistrarea A/AAAA. Acest lucru este acceptat atĂąta timp cĂąt Ăźnregistrarea indică resursele corecte.", "dns_records": "Înregistrări DNS", "dns_records_24hours": "Rețineți că modificările aduse DNS-ului pot dura pĂąnă la 24 de ore pentru a reflecta corect starea lor curentă pe această pagină. Acest mecanism este conceput ca o modalitate să vezi ușor cum să ĂźÈ›i configurezi Ăźnregistrările DNS și să verifici dacă toate Ăźnregistrările sunt stocate corect Ăźn DNS.", - "dns_records_docs": "Vă rugăm să consultați și documentația.", + "dns_records_docs": "Vă rugăm să consultați și documentația.", "dns_records_data": "Date corecte", "dns_records_name": "Nume", "dns_records_status": "Stare curentă", diff --git a/data/web/lang/lang.ru.json b/data/web/lang/lang.ru.json index 0628fe2d..c48d3945 100644 --- a/data/web/lang/lang.ru.json +++ b/data/web/lang/lang.ru.json @@ -494,7 +494,7 @@ "dns_records": "Запосо DNS", "dns_records_24hours": "ОбратОтД ĐČĐœĐžĐŒĐ°ĐœĐžĐ”, Ń‡Ń‚ĐŸ ĐŽĐ»Ń ĐČĐœĐ”ŃĐ”ĐœĐžŃ ĐžĐ·ĐŒĐ”ĐœĐ”ĐœĐžĐč ĐČ DNS ĐŒĐŸĐ¶Đ”Ń‚ ĐżĐŸŃ‚Ń€Đ”Đ±ĐŸĐČаться ĐŽĐŸ 24 Ń‡Đ°ŃĐŸĐČ, Ń‡Ń‚ĐŸĐ±Ń‹ праĐČĐžĐ»ŃŒĐœĐŸ ĐŸŃ‚ĐŸĐ±Ń€Đ°Đ·ĐžŃ‚ŃŒ ох тДĐșŃƒŃ‰Đ”Đ” ŃĐŸŃŃ‚ĐŸŃĐœĐžĐ” ĐœĐ° ŃŃ‚ĐŸĐč ŃŃ‚Ń€Đ°ĐœĐžŃ†Đ”. Эта ŃŃ‚Ń€Đ°ĐœĐžŃ†Đ° ĐżŃ€Đ”ĐŽĐœĐ°Đ·ĐœĐ°Ń‡Đ”Đœ ĐŽĐ»Ń Ń‚ĐŸĐłĐŸ, Ń‡Ń‚ĐŸĐ±Ń‹ ĐČы ĐŒĐŸĐłĐ»Đž лДгĐșĐŸ уĐČĐžĐŽĐ”Ń‚ŃŒ, ĐșаĐș ĐœĐ°ŃŃ‚Ń€ĐŸĐžŃ‚ŃŒ запОсО DNS Đž ĐżŃ€ĐŸĐČĐ”Ń€ĐžŃ‚ŃŒ, ĐČсД лО запОсО праĐČĐžĐ»ŃŒĐœĐŸ Đ·Đ°ĐœĐ”ŃĐ”ĐœŃ‹ ĐČ DNS.", "dns_records_data": "Đ—ĐœĐ°Ń‡Đ”ĐœĐžĐ”", - "dns_records_docs": "ĐŸĐŸĐ¶Đ°Đ»ŃƒĐčста, ĐŸĐ·ĐœĐ°ĐșĐŸĐŒŃŒŃ‚Đ”ŃŃŒ с ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚Đ°Ń†ĐžĐ”Đč.", + "dns_records_docs": "ĐŸĐŸĐ¶Đ°Đ»ŃƒĐčста, ĐŸĐ·ĐœĐ°ĐșĐŸĐŒŃŒŃ‚Đ”ŃŃŒ с ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚Đ°Ń†ĐžĐ”Đč.", "dns_records_name": "ĐĐ°Đ·ĐČĐ°ĐœĐžĐ”", "dns_records_status": "Статус", "dns_records_type": "йОп", diff --git a/data/web/lang/lang.sk.json b/data/web/lang/lang.sk.json index 1a8b133f..cc605c82 100644 --- a/data/web/lang/lang.sk.json +++ b/data/web/lang/lang.sk.json @@ -105,7 +105,8 @@ "timeout2": "ČasovĂœ limit pre spojenie s lokĂĄlnym serverom", "username": "PouĆŸĂ­vateÄŸskĂ© meno", "validate": "OveriĆ„", - "validation_success": "ÚspeĆĄne overenĂ©" + "validation_success": "ÚspeĆĄne overenĂ©", + "app_passwd_protocols": "PovolenĂ© protokoly" }, "admin": { "access": "PrĂ­stup", @@ -460,7 +461,8 @@ "unlimited_quota_acl": "NeobmedzenĂ© kvĂłta je zakĂĄzanĂĄ cez ACL", "username_invalid": "PouĆŸĂ­vateÄŸskĂ© meno %s nemĂŽĆŸe byĆ„ pouĆŸitĂ©", "validity_missing": "Zadajte periĂłdu platnosti", - "value_missing": "ProsĂ­m poskytnite vĆĄetky hodnoty" + "value_missing": "ProsĂ­m poskytnite vĆĄetky hodnoty", + "yotp_verification_failed": "Overenie cez OTP Yubico zlyhalo: %s" }, "debug": { "chart_this_server": "Graf (tento server)", @@ -494,7 +496,7 @@ "dns_records": "DNS zĂĄznamy", "dns_records_24hours": "Berte prosĂ­m do Ășvahy, ĆŸe zmeny v DNS mĂŽĆŸu trvaĆ„ aĆŸ 24 hodĂ­n, aby sa zmeny prejavili na tejto strĂĄnke. Pre jednoduchosĆ„ DNS konfigurĂĄcie mĂŽĆŸete pouĆŸiĆ„ Ășdaje uvedenĂ© niĆŸĆĄie, prĂ­padne skontrolovaĆ„ tak sprĂĄvnosĆ„ zĂĄznamov v DNS.", "dns_records_data": "SprĂĄvne dĂĄta", - "dns_records_docs": "Pozrite si prosĂ­m dokumentĂĄciu.", + "dns_records_docs": "Pozrite si prosĂ­m dokumentĂĄciu.", "dns_records_name": "Meno", "dns_records_status": "SĂșčasnĂœ stav", "dns_records_type": "Typ", @@ -608,7 +610,10 @@ "title": "UpraviĆ„ objekt", "unchanged_if_empty": "Ak nemenĂ­te, nechajte prĂĄzdne", "username": "PouĆŸĂ­vateÄŸskĂ© meno", - "validate_save": "ValidovaĆ„ a uloĆŸiĆ„" + "validate_save": "ValidovaĆ„ a uloĆŸiĆ„", + "sogo_access": "PrideliĆ„ priame prihlĂĄsenie do SOGo", + "sogo_access_info": "JednotnĂ© prihlĂĄsenie z pouĆŸĂ­vateÄŸskĂ©ho mail rozhrania zostĂĄva funkčnĂ©. Toto nastavenie nemĂĄ vplyv na prĂ­stup k ostatnĂœm sluĆŸbĂĄm, ani neodstraƈuje alebo nemenĂ­ existujĂșci profil pouĆŸĂ­vateÄŸa SOGo.", + "app_passwd_protocols": "PovolenĂ© protokoly" }, "fido2": { "confirm": "PotvrdiĆ„", @@ -985,7 +990,7 @@ "enter_qr_code": "Zadajte vĂĄĆĄ TOTP kĂłd, ak vaĆĄe zariadenie nedokĂĄĆŸe skenovaĆ„ QR kĂłdy", "error_code": "Chyba kĂłdu", "init_webauthn": "InicializĂĄcia, prosĂ­m čakajte...", - "key_id": "IdentifikĂĄtor pre vĂĄĆĄ YubiKey", + "key_id": "IdentifikĂĄtor zariadenia", "key_id_totp": "IdentifikĂĄtor pre vĂĄĆĄ kÄŸĂșč", "none": "DeaktivovaĆ„", "reload_retry": "- (obnovte strĂĄnku, ak chyba pretrvĂĄva)", @@ -999,7 +1004,9 @@ "webauthn": "WebAuthn autentifikĂĄcia", "waiting_usb_auth": "Čakanie na USB zariadenie...

Prosím stlačte tlačidlo na vaơom USB zariadení.", "waiting_usb_register": "Čakanie na USB zariadenie...

ProsĂ­m zadajte vaĆĄe heslo a potvrďte registrĂĄciu stlačenĂ­m tlačidla na vaĆĄom USB zariadenĂ­.", - "yubi_otp": "Yubico OTP autentifikĂĄcia" + "yubi_otp": "Yubico OTP autentifikĂĄcia", + "u2f_deprecated_important": "Zaregistrujte si svoj KÄŸĂșč v paneli sprĂĄvcu pomocou novej metĂłdy WebAuthn.", + "u2f_deprecated": "ZdĂĄ sa, ĆŸe vĂĄĆĄ kÄŸĂșč bol zaregistrovanĂœ pomocou zastaranej metĂłdy U2F. Deaktivujeme vĂĄm dvojfaktorovĂș autentifikĂĄciu a odstrĂĄnime vĂĄĆĄ KÄŸĂșč." }, "user": { "action": "Akcia", @@ -1155,7 +1162,10 @@ "weekly": "TĂœĆŸdenne", "weeks": "tĂœĆŸdne", "year": "rok", - "years": "rokov" + "years": "rokov", + "apple_connection_profile_with_app_password": "NovĂ© heslo aplikĂĄcie sa vygeneruje a pridĂĄ do profilu, takĆŸe pri nastavovanĂ­ zariadenia nie je potrebnĂ© zadĂĄvaĆ„ ĆŸiadne heslo. SĂșbor nezdieÄŸajte, pretoĆŸe poskytuje ĂșplnĂœ prĂ­stup k vaĆĄej mail schrĂĄnke.", + "change_password_hint_app_passwords": "VaĆĄe konto mĂĄ {{number_of_app_passwords}} hesiel aplikĂĄciĂ­, ktorĂ© nebudĂș zmenenĂ©. Ak ich chcete spravovaĆ„, prejdite na kartu HeslĂĄ aplikĂĄciĂ­.", + "direct_protocol_access": "Tento pouĆŸĂ­vateÄŸ mailovej schrĂĄnky mĂĄ priamy, externĂœ prĂ­stup k nasledujĂșcim protokolom a aplikĂĄciĂĄm. Toto nastavenie kontroluje administrĂĄtor. Na udelenie prĂ­stupu k jednotlivĂœm protokolom a aplikĂĄciĂĄm je moĆŸnĂ© vytvoriĆ„ heslĂĄ aplikĂĄciĂ­.
Tlačidlo \"PrihlĂĄsenie do webmailu\" poskytuje jednotnĂ© prihlĂĄsenie do systĂ©mu SOGo a je vĆŸdy k dispozĂ­cii." }, "warning": { "cannot_delete_self": "NemoĆŸno vymazaĆ„ prihlĂĄsenĂ©ho pouĆŸĂ­vateÄŸa", diff --git a/data/web/lang/lang.sv.json b/data/web/lang/lang.sv.json index 12cf2586..cd43ba8c 100644 --- a/data/web/lang/lang.sv.json +++ b/data/web/lang/lang.sv.json @@ -478,7 +478,7 @@ "cname_from_a": "VĂ€rde hĂ€rstammar frĂ„n A/AAAA-uppslaget. Detta stöds sĂ„ lĂ€nge som uppslaget pekar mot rĂ€tt resurs.", "dns_records": "DNS-uppslag", "dns_records_24hours": "Observera att Ă€ndringar gjorda i DNS kan ta upp till 24 timmar innan det visas korrekt pĂ„ denna sida. Syftet med sidan Ă€r att enkelt se hur DNS-uppslagen Ă€r konfigurerade. Det Ă€r lĂ€tt att kontrollera att DNS-uppslagen Ă€r korrekt uppsatta.", - "dns_records_docs": "Se Ă€ven dokumentationen.", + "dns_records_docs": "Se Ă€ven dokumentationen.", "dns_records_data": "Korrektdata", "dns_records_name": "Namn", "dns_records_status": "Nuvarande status", diff --git a/data/web/templates/admin/tab-config-admins.twig b/data/web/templates/admin/tab-config-admins.twig index d2eb4072..eefaa630 100644 --- a/data/web/templates/admin/tab-config-admins.twig +++ b/data/web/templates/admin/tab-config-admins.twig @@ -65,162 +65,164 @@
- -
-
-
- - - + +
+
+
+ + + +
-
-
-
-
{{ lang.fido2.register_status }}:
-
-
-
-

-
- - - {{ lang.admin.guid_and_license }} - -
-
-
- -
-
- - - - -
-

- {{ lang.admin.customer_id }}: {{ gal.c|default('?')|raw }} - - {{ lang.admin.service_id }}: {{ gal.s|default('?')|raw }} - - {{ lang.admin.sal_level }}: {{ gal.m|default('?')|raw }} -

-
+
+
{{ lang.fido2.register_status }}:
+
+
-
-
-
-

{{ lang.admin.license_info|raw }}

-
- +
+
+ + + {{ lang.admin.guid_and_license }} + +
+ +
+ +
+
+ + + + +
+

+ {{ lang.admin.customer_id }}: {{ gal.c|default('?')|raw }} - + {{ lang.admin.service_id }}: {{ gal.s|default('?')|raw }} - + {{ lang.admin.sal_level }}: {{ gal.m|default('?')|raw }} +

-
- -
- - - API - -
-
-
-

{{ lang.admin.api_info|raw }}

-
-
-
-
-

{{ lang.admin.api_read_only }}

+
+
+

{{ lang.admin.license_info|raw }}

+
+ +
-
-
-
- -
- -
-
-
-
- -
-
-
- -
-
{{ api.ro.api_key|default('-') }}
-
-
-
-
- -
-
-
-
-
- - +
+ +
+ + + API + +
+
+
+

{{ lang.admin.api_info|raw }}

+
+
+
+
+

{{ lang.admin.api_read_only }}

+
+
+
+
+ +
+
-
- -
-
-
-
-
-
-

{{ lang.admin.api_read_write }}

-
-
-
-
- -
- -
-
-
-
- -
-
-
- -
-
{{ api.rw.api_key|default('-') }}
-
-
-
-
- -
-
-
-
-
- - +
+
+
-
- +
+ +
+
{{ api.ro.api_key|default('-') }}
+
+
+
+
+ +
+
+
+
+
+ + +
+
+
+ +
+
+
+
+
+
+

{{ lang.admin.api_read_write }}

+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+
{{ api.rw.api_key|default('-') }}
+
+
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
{{ lang.admin.domain_admins }}
@@ -246,4 +248,3 @@
- diff --git a/data/web/templates/admin/tab-config-quarantine.twig b/data/web/templates/admin/tab-config-quarantine.twig index 047c3e39..2ed9f05f 100644 --- a/data/web/templates/admin/tab-config-quarantine.twig +++ b/data/web/templates/admin/tab-config-quarantine.twig @@ -71,7 +71,7 @@
diff --git a/data/web/templates/user/tab-user-auth.twig b/data/web/templates/user/tab-user-auth.twig index c35eee39..e1f84fff 100644 --- a/data/web/templates/user/tab-user-auth.twig +++ b/data/web/templates/user/tab-user-auth.twig @@ -118,7 +118,7 @@ {% if mailboxdata.attributes.force_pw_update == '1' %}
{{ lang.user.force_pw_update|raw }}
{% endif %} -

[{{ lang.user.client_configuration }}]

+

[{{ lang.user.client_configuration }}]

[{{ lang.user.show_sieve_filters }}]


diff --git a/docker-compose.yml b/docker-compose.yml index d706d2dc..74b01aca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,7 +58,7 @@ services: - redis clamd-mailcow: - image: mailcow/clamd:1.43 + image: mailcow/clamd:1.44 restart: always dns: - ${IPV4_NETWORK:-172.22.1}.254 @@ -73,7 +73,7 @@ services: - clamd rspamd-mailcow: - image: mailcow/rspamd:1.79 + image: mailcow/rspamd:1.80 stop_grace_period: 30s depends_on: - dovecot-mailcow @@ -212,7 +212,7 @@ services: - sogo dovecot-mailcow: - image: mailcow/dovecot:1.159 + image: mailcow/dovecot:1.161 depends_on: - mysql-mailcow dns: @@ -464,7 +464,7 @@ services: - DBPASS=${DBPASS} - DBROOT=${DBROOT} - USE_WATCHDOG=${USE_WATCHDOG:-n} - - WATCHDOG_NOTIFY_EMAIL=${WATCHDOG_NOTIFY_EMAIL} + - WATCHDOG_NOTIFY_EMAIL=${WATCHDOG_NOTIFY_EMAIL:-} - WATCHDOG_NOTIFY_BAN=${WATCHDOG_NOTIFY_BAN:-y} - WATCHDOG_SUBJECT=${WATCHDOG_SUBJECT:-Watchdog ALERT} - WATCHDOG_EXTERNAL_CHECKS=${WATCHDOG_EXTERNAL_CHECKS:-n} @@ -540,7 +540,7 @@ services: - solr olefy-mailcow: - image: mailcow/olefy:1.8.1 + image: mailcow/olefy:1.9 restart: always environment: - TZ=${TZ} @@ -548,7 +548,7 @@ services: - OLEFY_BINDPORT=10055 - OLEFY_TMPDIR=/tmp - OLEFY_PYTHON_PATH=/usr/bin/python3 - - OLEFY_OLEVBA_PATH=/usr/bin/olevba3 + - OLEFY_OLEVBA_PATH=/usr/bin/olevba - OLEFY_LOGLVL=20 - OLEFY_MINLENGTH=500 - OLEFY_DEL_TMP=1 diff --git a/generate_config.sh b/generate_config.sh index e6f322ac..6bef72ea 100755 --- a/generate_config.sh +++ b/generate_config.sh @@ -119,7 +119,7 @@ MAILCOW_HOSTNAME=${MAILCOW_HOSTNAME} # Password hash algorithm # Only certain password hash algorithm are supported. For a fully list of supported schemes, -# see https://mailcow.github.io/mailcow-dockerized-docs/model-passwd/ +# see https://mailcow.github.io/mailcow-dockerized-docs/models/model-passwd/ MAILCOW_PASS_SCHEME=BLF-CRYPT # ------------------------------ @@ -145,7 +145,7 @@ DBROOT=$(LC_ALL=C > mailcow.conf echo '# Only certain password hash algorithm are supported. For a fully list of supported schemes,' >> mailcow.conf - echo '# see https://mailcow.github.io/mailcow-dockerized-docs/model-passwd/' >> mailcow.conf + echo '# see https://mailcow.github.io/mailcow-dockerized-docs/models/model-passwd/' >> mailcow.conf echo "MAILCOW_PASS_SCHEME=BLF-CRYPT" >> mailcow.conf fi elif [[ ${option} == "ADDITIONAL_SERVER_NAMES" ]]; then @@ -512,7 +512,7 @@ for option in ${CONFIG_ARRAY[@]}; do echo '# Optional: Leave empty for none' >> mailcow.conf echo '# This value is only used on first order!' >> mailcow.conf echo '# Setting it at a later point will require the following steps:' >> mailcow.conf - echo '# https://mailcow.github.io/mailcow-dockerized-docs/debug-reset-tls/' >> mailcow.conf + echo '# https://mailcow.github.io/mailcow-dockerized-docs/troubleshooting/debug-reset_tls/' >> mailcow.conf echo 'ACME_CONTACT=' >> mailcow.conf fi elif [[ ${option} == "WEBAUTHN_ONLY_TRUSTED_VENDORS" ]]; then From a1a96bfabb62675310d4a17184fe7c0b2b0ab621 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com> Date: Wed, 26 Jan 2022 10:55:03 +0100 Subject: [PATCH 04/36] [Web] add github version tag --- generate_config.sh | 379 ----------------------- update.sh | 758 --------------------------------------------- 2 files changed, 1137 deletions(-) delete mode 100755 generate_config.sh delete mode 100755 update.sh diff --git a/generate_config.sh b/generate_config.sh deleted file mode 100755 index 6bef72ea..00000000 --- a/generate_config.sh +++ /dev/null @@ -1,379 +0,0 @@ -#!/usr/bin/env bash - -set -o pipefail - -if [[ "$(uname -r)" =~ ^4\.15\.0-60 ]]; then - echo "DO NOT RUN mailcow ON THIS UBUNTU KERNEL!"; - echo "Please update to 5.x or use another distribution." - exit 1 -fi - -if [[ "$(uname -r)" =~ ^4\.4\. ]]; then - if grep -q Ubuntu <<< $(uname -a); then - echo "DO NOT RUN mailcow ON THIS UBUNTU KERNEL!"; - echo "Please update to linux-generic-hwe-16.04 by running \"apt-get install --install-recommends linux-generic-hwe-16.04\"" - exit 1 - fi -fi - -if grep --help 2>&1 | grep -q -i "busybox"; then - echo "BusyBox grep detected, please install gnu grep, \"apk add --no-cache --upgrade grep\"" - exit 1 -fi -if cp --help 2>&1 | grep -q -i "busybox"; then - echo "BusyBox cp detected, please install coreutils, \"apk add --no-cache --upgrade coreutils\"" - exit 1 -fi - -for bin in openssl curl docker-compose docker git awk sha1sum; do - if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi -done - -if [ -f mailcow.conf ]; then - read -r -p "A config file exists and will be overwritten, are you sure you want to continue? [y/N] " response - case $response in - [yY][eE][sS]|[yY]) - mv mailcow.conf mailcow.conf_backup - chmod 600 mailcow.conf_backup - ;; - *) - exit 1 - ;; - esac -fi - -echo "Press enter to confirm the detected value '[value]' where applicable or enter a custom value." -while [ -z "${MAILCOW_HOSTNAME}" ]; do - read -p "Mail server hostname (FQDN) - this is not your mail domain, but your mail servers hostname: " -e MAILCOW_HOSTNAME - DOTS=${MAILCOW_HOSTNAME//[^.]}; - if [ ${#DOTS} -lt 2 ] && [ ! -z ${MAILCOW_HOSTNAME} ]; then - echo "${MAILCOW_HOSTNAME} is not a FQDN" - MAILCOW_HOSTNAME= - fi -done - -if [ -a /etc/timezone ]; then - DETECTED_TZ=$(cat /etc/timezone) -elif [ -a /etc/localtime ]; then - DETECTED_TZ=$(readlink /etc/localtime|sed -n 's|^.*zoneinfo/||p') -fi - -while [ -z "${MAILCOW_TZ}" ]; do - if [ -z "${DETECTED_TZ}" ]; then - read -p "Timezone: " -e MAILCOW_TZ - else - read -p "Timezone [${DETECTED_TZ}]: " -e MAILCOW_TZ - [ -z "${MAILCOW_TZ}" ] && MAILCOW_TZ=${DETECTED_TZ} - fi -done - -MEM_TOTAL=$(awk '/MemTotal/ {print $2}' /proc/meminfo) - -if [ ${MEM_TOTAL} -le "2621440" ]; then - echo "Installed memory is <= 2.5 GiB. It is recommended to disable ClamAV to prevent out-of-memory situations." - echo "ClamAV can be re-enabled by setting SKIP_CLAMD=n in mailcow.conf." - read -r -p "Do you want to disable ClamAV now? [Y/n] " response - case $response in - [nN][oO]|[nN]) - SKIP_CLAMD=n - ;; - *) - SKIP_CLAMD=y - ;; - esac -else - SKIP_CLAMD=n -fi - -if [ ${MEM_TOTAL} -le "2097152" ]; then - echo "Disabling Solr on low-memory system." - SKIP_SOLR=y -elif [ ${MEM_TOTAL} -le "3670016" ]; then - echo "Installed memory is <= 3.5 GiB. It is recommended to disable Solr to prevent out-of-memory situations." - echo "Solr is a prone to run OOM and should be monitored. The default Solr heap size is 1024 MiB and should be set in mailcow.conf according to your expected load." - echo "Solr can be re-enabled by setting SKIP_SOLR=n in mailcow.conf but will refuse to start with less than 2 GB total memory." - read -r -p "Do you want to disable Solr now? [Y/n] " response - case $response in - [nN][oO]|[nN]) - SKIP_SOLR=n - ;; - *) - SKIP_SOLR=y - ;; - esac -else - SKIP_SOLR=n -fi - -[ ! -f ./data/conf/rspamd/override.d/worker-controller-password.inc ] && echo '# Placeholder' > ./data/conf/rspamd/override.d/worker-controller-password.inc - -cat << EOF > mailcow.conf -# ------------------------------ -# mailcow web ui configuration -# ------------------------------ -# example.org is _not_ a valid hostname, use a fqdn here. -# Default admin user is "admin" -# Default password is "moohoo" - -MAILCOW_HOSTNAME=${MAILCOW_HOSTNAME} - -# Password hash algorithm -# Only certain password hash algorithm are supported. For a fully list of supported schemes, -# see https://mailcow.github.io/mailcow-dockerized-docs/models/model-passwd/ -MAILCOW_PASS_SCHEME=BLF-CRYPT - -# ------------------------------ -# SQL database configuration -# ------------------------------ - -DBNAME=mailcow -DBUSER=mailcow - -# Please use long, random alphanumeric strings (A-Za-z0-9) - -DBPASS=$(LC_ALL=C data/web/inc/app_info.inc.php - echo ' $MAILCOW_GIT_VERSION="'$mailcow_git_version'";' >> data/web/inc/app_info.inc.php - echo ' $MAILCOW_GIT_URL="'$mailcow_git_url'";' >> data/web/inc/app_info.inc.php - echo '?>' >> data/web/inc/app_info.inc.php -else - echo ' data/web/inc/app_info.inc.php - echo ' $MAILCOW_GIT_VERSION="";' >> data/web/inc/app_info.inc.php - echo ' $MAILCOW_GIT_URL="";' >> data/web/inc/app_info.inc.php - echo '?>' >> data/web/inc/app_info.inc.php - echo -e "\e[33mCannot determine current git repository version...\e[0m" -fi diff --git a/update.sh b/update.sh deleted file mode 100755 index 033aa140..00000000 --- a/update.sh +++ /dev/null @@ -1,758 +0,0 @@ -#!/usr/bin/env bash - -# Check permissions -if [ "$(id -u)" -ne "0" ]; then - echo "You need to be root" - exit 1 -fi - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# Run pre-update-hook -if [ -f "${SCRIPT_DIR}/pre_update_hook.sh" ]; then - bash "${SCRIPT_DIR}/pre_update_hook.sh" -fi - -if [[ "$(uname -r)" =~ ^4\.15\.0-60 ]]; then - echo "DO NOT RUN mailcow ON THIS UBUNTU KERNEL!"; - echo "Please update to 5.x or use another distribution." - exit 1 -fi - -if [[ "$(uname -r)" =~ ^4\.4\. ]]; then - if grep -q Ubuntu <<< $(uname -a); then - echo "DO NOT RUN mailcow ON THIS UBUNTU KERNEL!" - echo "Please update to linux-generic-hwe-16.04 by running \"apt-get install --install-recommends linux-generic-hwe-16.04\"" - exit 1 - fi - echo "mailcow on a 4.4.x kernel is not supported. It may or may not work, please upgrade your kernel or continue at your own risk." - read -p "Press any key to continue..." < /dev/tty -fi - -# Exit on error and pipefail -set -o pipefail - -# Setting high dc timeout -export COMPOSE_HTTP_TIMEOUT=600 - -# Add /opt/bin to PATH -PATH=$PATH:/opt/bin - -umask 0022 - -for bin in curl docker-compose docker git awk sha1sum; do - if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi -done - -export LC_ALL=C -DATE=$(date +%Y-%m-%d_%H_%M_%S) -BRANCH=$(cd ${SCRIPT_DIR}; git rev-parse --abbrev-ref HEAD) - -check_online_status() { - CHECK_ONLINE_IPS=(1.1.1.1 9.9.9.9 8.8.8.8) - for ip in "${CHECK_ONLINE_IPS[@]}"; do - if timeout 3 ping -c 1 ${ip} > /dev/null; then - return 0 - fi - done - return 1 -} - -prefetch_images() { - [[ -z ${BRANCH} ]] && { echo -e "\e[33m\nUnknown branch...\e[0m"; exit 1; } - git fetch origin #${BRANCH} - while read image; do - if [[ "${image}" == "robbertkl/ipv6nat" ]]; then - if ! grep -qi "ipv6nat-mailcow" docker-compose.yml || grep -qi "enable_ipv6: false" docker-compose.yml; then - continue - fi - fi - RET_C=0 - until docker pull ${image}; do - RET_C=$((RET_C + 1)) - echo -e "\e[33m\nError pulling $image, retrying...\e[0m" - [ ${RET_C} -gt 3 ] && { echo -e "\e[31m\nToo many failed retries, exiting\e[0m"; exit 1; } - sleep 1 - done - done < <(git show origin/${BRANCH}:docker-compose.yml | grep "image:" | awk '{ gsub("image:","", $3); print $2 }') -} - -docker_garbage() { - IMGS_TO_DELETE=() - for container in $(grep -oP "image: \Kmailcow.+" "${SCRIPT_DIR}/docker-compose.yml"); do - REPOSITORY=${container/:*} - TAG=${container/*:} - V_MAIN=${container/*.} - V_SUB=${container/*.} - EXISTING_TAGS=$(docker images | grep ${REPOSITORY} | awk '{ print $2 }') - for existing_tag in ${EXISTING_TAGS[@]}; do - V_MAIN_EXISTING=${existing_tag/*.} - V_SUB_EXISTING=${existing_tag/*.} - # Not an integer - [[ ! $V_MAIN_EXISTING =~ ^[0-9]+$ ]] && continue - [[ ! $V_SUB_EXISTING =~ ^[0-9]+$ ]] && continue - - if [[ $V_MAIN_EXISTING == "latest" ]]; then - echo "Found deprecated label \"latest\" for repository $REPOSITORY, it should be deleted." - IMGS_TO_DELETE+=($REPOSITORY:$existing_tag) - elif [[ $V_MAIN_EXISTING -lt $V_MAIN ]]; then - echo "Found tag $existing_tag for $REPOSITORY, which is older than the current tag $TAG and should be deleted." - IMGS_TO_DELETE+=($REPOSITORY:$existing_tag) - elif [[ $V_SUB_EXISTING -lt $V_SUB ]]; then - echo "Found tag $existing_tag for $REPOSITORY, which is older than the current tag $TAG and should be deleted." - IMGS_TO_DELETE+=($REPOSITORY:$existing_tag) - fi - done - done - - if [[ ! -z ${IMGS_TO_DELETE[*]} ]]; then - echo "Run the following command to delete unused image tags:" - echo - echo " docker rmi ${IMGS_TO_DELETE[*]}" - echo - if [ ! $FORCE ]; then - read -r -p "Do you want to delete old image tags right now? [y/N] " response - if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then - docker rmi ${IMGS_TO_DELETE[*]} - else - echo "OK, skipped." - fi - else - echo "Running image removal without extra confirmation due to force mode." - docker rmi ${IMGS_TO_DELETE[*]} - fi - echo -e "\e[32mFurther cleanup...\e[0m" - echo "If you want to cleanup further garbage collected by Docker, please make sure all containers are up and running before cleaning your system by executing \"docker system prune\"" - fi -} - -in_array() { - local e match="$1" - shift - for e; do [[ "$e" == "$match" ]] && return 0; done - return 1 -} - -migrate_docker_nat() { - NAT_CONFIG='{"ipv6":true,"fixed-cidr-v6":"fd00:dead:beef:c0::/80","experimental":true,"ip6tables":true}' - # Min Docker version - DOCKERV_REQ=20.10.2 - # Current Docker version - DOCKERV_CUR=$(docker version -f '{{.Server.Version}}') - if grep -qi "ipv6nat-mailcow" docker-compose.yml && grep -qi "enable_ipv6: true" docker-compose.yml; then - echo -e "\e[32mNative IPv6 implementation available.\e[0m" - echo "This will enable experimental features in the Docker daemon and configure Docker to do the IPv6 NATing instead of ipv6nat-mailcow." - echo '!!! This step is recommended !!!' - echo "mailcow will try to roll back the changes if starting Docker fails after modifying the daemon.json configuration file." - read -r -p "Should we try to enable the native IPv6 implementation in Docker now (recommended)? [y/N] " dockernatresponse - if [[ ! "${dockernatresponse}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then - echo "OK, skipping this step." - return 0 - fi - fi - # Sort versions and check if we are running a newer or equal version to req - if [ $(printf "${DOCKERV_REQ}\n${DOCKERV_CUR}" | sort -V | tail -n1) == "${DOCKERV_CUR}" ]; then - # If Dockerd daemon json exists - if [ -s /etc/docker/daemon.json ]; then - IFS=',' read -r -a dockerconfig <<< $(cat /etc/docker/daemon.json | tr -cd '[:alnum:],') - if ! in_array ipv6true "${dockerconfig[@]}" || \ - ! in_array experimentaltrue "${dockerconfig[@]}" || \ - ! in_array ip6tablestrue "${dockerconfig[@]}" || \ - ! grep -qi "fixed-cidr-v6" /etc/docker/daemon.json; then - echo -e "\e[33mWarning:\e[0m You seem to have modified the /etc/docker/daemon.json configuration by yourself and not fully/correctly activated the native IPv6 NAT implementation." - echo "You will need to merge your existing configuration manually or fix/delete the existing daemon.json configuration before trying the update process again." - echo -e "Please merge the following content and restart the Docker daemon:\n" - echo ${NAT_CONFIG} - return 1 - fi - else - echo "Working on IPv6 NAT, please wait..." - echo ${NAT_CONFIG} > /etc/docker/daemon.json - ip6tables -F -t nat - [[ -e /etc/alpine-release ]] && rc-service docker restart || systemctl restart docker.service - if [[ $? -ne 0 ]]; then - echo -e "\e[31mError:\e[0m Failed to activate IPv6 NAT! Reverting and exiting." - rm /etc/docker/daemon.json - if [[ -e /etc/alpine-release ]]; then - rc-service docker restart - else - systemctl reset-failed docker.service - systemctl restart docker.service - fi - return 1 - fi - fi - # Removing legacy container - sed -i '/ipv6nat-mailcow:$/,/^$/d' docker-compose.yml - if [ -s docker-compose.override.yml ]; then - sed -i '/ipv6nat-mailcow:$/,/^$/d' docker-compose.override.yml - if [[ "$(cat docker-compose.override.yml | sed '/^\s*$/d' | wc -l)" == "2" ]]; then - mv docker-compose.override.yml docker-compose.override.yml_backup - fi - fi - echo -e "\e[32mGreat! \e[0mNative IPv6 NAT is active.\e[0m" - else - echo -e "\e[31mPlease upgrade Docker to version ${DOCKERV_REQ} or above.\e[0m" - return 0 - fi -} - -while (($#)); do - case "${1}" in - --check|-c) - echo "Checking remote code for updates..." - LATEST_REV=$(git ls-remote --exit-code --refs --quiet https://github.com/mailcow/mailcow-dockerized ${BRANCH} | cut -f1) - if [ $? -ne 0 ]; then - echo "A problem occurred while trying to fetch the latest revision from github." - exit 99 - fi - if [[ -z $(git log HEAD --pretty=format:"%H" | grep "${LATEST_REV}") ]]; then - echo -e "Updated code is available.\nThe changes can be found here: https://github.com/mailcow/mailcow-dockerized/commits/master" - git log --date=short --pretty=format:"%ad - %s" $(git rev-parse --short HEAD)..origin/master - exit 0 - else - echo "No updates available." - exit 3 - fi - ;; - --ours) - MERGE_STRATEGY=ours - ;; - --skip-start) - SKIP_START=y - ;; - --gc) - echo -e "\e[32mCollecting garbage...\e[0m" - docker_garbage - exit 0 - ;; - --prefetch) - echo -e "\e[32mPrefetching images...\e[0m" - prefetch_images - exit 0 - ;; - -f|--force) - echo -e "\e[32mRunning in forced mode...\e[0m" - FORCE=y - ;; - --no-update-compose) - NO_UPDATE_COMPOSE=y - ;; - --help|-h) - echo './update.sh [-c|--check, --ours, --gc, --no-update-compose, --prefetch, --skip-start, -f|--force, -h|--help] - - -c|--check - Check for updates and exit (exit codes => 0: update available, 3: no updates) - --ours - Use merge strategy option "ours" to solve conflicts in favor of non-mailcow code (local changes over remote changes), not recommended! - --gc - Run garbage collector to delete old image tags - --no-update-compose - Do not update docker-compose - --prefetch - Only prefetch new images and exit (useful to prepare updates) - --skip-start - Do not start mailcow after update - -f|--force - Force update, do not ask questions -' - exit 1 - esac - shift -done - -[[ ! -f mailcow.conf ]] && { echo "mailcow.conf is missing"; exit 1;} -chmod 600 mailcow.conf -source mailcow.conf -DOTS=${MAILCOW_HOSTNAME//[^.]}; -if [ ${#DOTS} -lt 2 ]; then - echo "MAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is not a FQDN!" - echo "Please change it to a FQDN and run docker-compose down followed by docker-compose up -d" - exit 1 -fi - -if grep --help 2>&1 | head -n 1 | grep -q -i "busybox"; then echo "BusyBox grep detected, please install gnu grep, \"apk add --no-cache --upgrade grep\""; exit 1; fi -# This will also cover sort -if cp --help 2>&1 | head -n 1 | grep -q -i "busybox"; then echo "BusyBox cp detected, please install coreutils, \"apk add --no-cache --upgrade coreutils\""; exit 1; fi -if sed --help 2>&1 | head -n 1 | grep -q -i "busybox"; then echo "BusyBox sed detected, please install gnu sed, \"apk add --no-cache --upgrade sed\""; exit 1; fi - -CONFIG_ARRAY=( - "SKIP_LETS_ENCRYPT" - "SKIP_SOGO" - "USE_WATCHDOG" - "WATCHDOG_NOTIFY_EMAIL" - "WATCHDOG_NOTIFY_BAN" - "WATCHDOG_EXTERNAL_CHECKS" - "WATCHDOG_SUBJECT" - "SKIP_CLAMD" - "SKIP_IP_CHECK" - "ADDITIONAL_SAN" - "DOVEADM_PORT" - "IPV4_NETWORK" - "IPV6_NETWORK" - "LOG_LINES" - "SNAT_TO_SOURCE" - "SNAT6_TO_SOURCE" - "COMPOSE_PROJECT_NAME" - "SQL_PORT" - "API_KEY" - "API_KEY_READ_ONLY" - "API_ALLOW_FROM" - "MAILDIR_GC_TIME" - "MAILDIR_SUB" - "ACL_ANYONE" - "SOLR_HEAP" - "SKIP_SOLR" - "ENABLE_SSL_SNI" - "ALLOW_ADMIN_EMAIL_LOGIN" - "SKIP_HTTP_VERIFICATION" - "SOGO_EXPIRE_SESSION" - "REDIS_PORT" - "DOVECOT_MASTER_USER" - "DOVECOT_MASTER_PASS" - "MAILCOW_PASS_SCHEME" - "ADDITIONAL_SERVER_NAMES" - "ACME_CONTACT" - "WATCHDOG_VERBOSE" - "WEBAUTHN_ONLY_TRUSTED_VENDORS" -) - -sed -i --follow-symlinks '$a\' mailcow.conf -for option in ${CONFIG_ARRAY[@]}; do - if [[ ${option} == "ADDITIONAL_SAN" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo "${option}=" >> mailcow.conf - fi - elif [[ ${option} == "COMPOSE_PROJECT_NAME" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo "COMPOSE_PROJECT_NAME=mailcowdockerized" >> mailcow.conf - fi - elif [[ ${option} == "DOVEADM_PORT" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo "DOVEADM_PORT=127.0.0.1:19991" >> mailcow.conf - fi - elif [[ ${option} == "WATCHDOG_NOTIFY_EMAIL" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo "WATCHDOG_NOTIFY_EMAIL=" >> mailcow.conf - fi - elif [[ ${option} == "LOG_LINES" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Max log lines per service to keep in Redis logs' >> mailcow.conf - echo "LOG_LINES=9999" >> mailcow.conf - fi - elif [[ ${option} == "IPV4_NETWORK" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Internal IPv4 /24 subnet, format n.n.n. (expands to n.n.n.0/24)' >> mailcow.conf - echo "IPV4_NETWORK=172.22.1" >> mailcow.conf - fi - elif [[ ${option} == "IPV6_NETWORK" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Internal IPv6 subnet in fc00::/7' >> mailcow.conf - echo "IPV6_NETWORK=fd4d:6169:6c63:6f77::/64" >> mailcow.conf - fi - elif [[ ${option} == "SQL_PORT" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Bind SQL to 127.0.0.1 on port 13306' >> mailcow.conf - echo "SQL_PORT=127.0.0.1:13306" >> mailcow.conf - fi - elif [[ ${option} == "API_KEY" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Create or override API key for web UI' >> mailcow.conf - echo "#API_KEY=" >> mailcow.conf - fi - elif [[ ${option} == "API_KEY_READ_ONLY" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Create or override read-only API key for web UI' >> mailcow.conf - echo "#API_KEY_READ_ONLY=" >> mailcow.conf - fi - elif [[ ${option} == "API_ALLOW_FROM" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Must be set for API_KEY to be active' >> mailcow.conf - echo '# IPs only, no networks (networks can be set via UI)' >> mailcow.conf - echo "#API_ALLOW_FROM=" >> mailcow.conf - fi - elif [[ ${option} == "SNAT_TO_SOURCE" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Use this IPv4 for outgoing connections (SNAT)' >> mailcow.conf - echo "#SNAT_TO_SOURCE=" >> mailcow.conf - fi - elif [[ ${option} == "SNAT6_TO_SOURCE" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Use this IPv6 for outgoing connections (SNAT)' >> mailcow.conf - echo "#SNAT6_TO_SOURCE=" >> mailcow.conf - fi - elif [[ ${option} == "MAILDIR_GC_TIME" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Garbage collector cleanup' >> mailcow.conf - echo '# Deleted domains and mailboxes are moved to /var/vmail/_garbage/timestamp_sanitizedstring' >> mailcow.conf - echo '# How long should objects remain in the garbage until they are being deleted? (value in minutes)' >> mailcow.conf - echo '# Check interval is hourly' >> mailcow.conf - echo 'MAILDIR_GC_TIME=1440' >> mailcow.conf - fi - elif [[ ${option} == "ACL_ANYONE" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Set this to "allow" to enable the anyone pseudo user. Disabled by default.' >> mailcow.conf - echo '# When enabled, ACL can be created, that apply to "All authenticated users"' >> mailcow.conf - echo '# This should probably only be activated on mail hosts, that are used exclusivly by one organisation.' >> mailcow.conf - echo '# Otherwise a user might share data with too many other users.' >> mailcow.conf - echo 'ACL_ANYONE=disallow' >> mailcow.conf - fi - elif [[ ${option} == "SOLR_HEAP" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Solr heap size, there is no recommendation, please see Solr docs.' >> mailcow.conf - echo '# Solr is a prone to run OOM on large systems and should be monitored. Unmonitored Solr setups are not recommended.' >> mailcow.conf - echo '# Solr will refuse to start with total system memory below or equal to 2 GB.' >> mailcow.conf - echo "SOLR_HEAP=1024" >> mailcow.conf - fi - elif [[ ${option} == "SKIP_SOLR" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Solr is disabled by default after upgrading from non-Solr to Solr-enabled mailcows.' >> mailcow.conf - echo '# Disable Solr or if you do not want to store a readable index of your mails in solr-vol-1.' >> mailcow.conf - echo "SKIP_SOLR=y" >> mailcow.conf - fi - elif [[ ${option} == "ENABLE_SSL_SNI" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Create seperate certificates for all domains - y/n' >> mailcow.conf - echo '# this will allow adding more than 100 domains, but some email clients will not be able to connect with alternative hostnames' >> mailcow.conf - echo '# see https://wiki.dovecot.org/SSL/SNIClientSupport' >> mailcow.conf - echo "ENABLE_SSL_SNI=n" >> mailcow.conf - fi - elif [[ ${option} == "SKIP_SOGO" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Skip SOGo: Will disable SOGo integration and therefore webmail, DAV protocols and ActiveSync support (experimental, unsupported, not fully implemented) - y/n' >> mailcow.conf - echo "SKIP_SOGO=n" >> mailcow.conf - fi - elif [[ ${option} == "MAILDIR_SUB" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# MAILDIR_SUB defines a path in a users virtual home to keep the maildir in. Leave empty for updated setups.' >> mailcow.conf - echo "#MAILDIR_SUB=Maildir" >> mailcow.conf - echo "MAILDIR_SUB=" >> mailcow.conf - fi - elif [[ ${option} == "WATCHDOG_NOTIFY_BAN" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Notify about banned IP. Includes whois lookup.' >> mailcow.conf - echo "WATCHDOG_NOTIFY_BAN=y" >> mailcow.conf - fi - elif [[ ${option} == "WATCHDOG_SUBJECT" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Subject for watchdog mails. Defaults to "Watchdog ALERT" followed by the error message.' >> mailcow.conf - echo "#WATCHDOG_SUBJECT=" >> mailcow.conf - fi - elif [[ ${option} == "WATCHDOG_EXTERNAL_CHECKS" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Checks if mailcow is an open relay. Requires a SAL. More checks will follow.' >> mailcow.conf - echo '# No data is collected. Opt-in and anonymous.' >> mailcow.conf - echo '# Will only work with unmodified mailcow setups.' >> mailcow.conf - echo "WATCHDOG_EXTERNAL_CHECKS=n" >> mailcow.conf - fi - elif [[ ${option} == "SOGO_EXPIRE_SESSION" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# SOGo session timeout in minutes' >> mailcow.conf - echo "SOGO_EXPIRE_SESSION=480" >> mailcow.conf - fi - elif [[ ${option} == "REDIS_PORT" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo "REDIS_PORT=127.0.0.1:7654" >> mailcow.conf - fi - elif [[ ${option} == "DOVECOT_MASTER_USER" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# DOVECOT_MASTER_USER and _PASS must _both_ be provided. No special chars.' >> mailcow.conf - echo '# Empty by default to auto-generate master user and password on start.' >> mailcow.conf - echo '# User expands to DOVECOT_MASTER_USER@mailcow.local' >> mailcow.conf - echo '# LEAVE EMPTY IF UNSURE' >> mailcow.conf - echo "DOVECOT_MASTER_USER=" >> mailcow.conf - fi - elif [[ ${option} == "DOVECOT_MASTER_PASS" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# LEAVE EMPTY IF UNSURE' >> mailcow.conf - echo "DOVECOT_MASTER_PASS=" >> mailcow.conf - fi - elif [[ ${option} == "MAILCOW_PASS_SCHEME" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo '# Password hash algorithm' >> mailcow.conf - echo '# Only certain password hash algorithm are supported. For a fully list of supported schemes,' >> mailcow.conf - echo '# see https://mailcow.github.io/mailcow-dockerized-docs/models/model-passwd/' >> mailcow.conf - echo "MAILCOW_PASS_SCHEME=BLF-CRYPT" >> mailcow.conf - fi - elif [[ ${option} == "ADDITIONAL_SERVER_NAMES" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo '# Additional server names for mailcow UI' >> mailcow.conf - echo '#' >> mailcow.conf - echo '# Specify alternative addresses for the mailcow UI to respond to' >> mailcow.conf - echo '# This is useful when you set mail.* as ADDITIONAL_SAN and want to make sure mail.maildomain.com will always point to the mailcow UI.' >> mailcow.conf - echo '# If the server name does not match a known site, Nginx decides by best-guess and may redirect users to the wrong web root.' >> mailcow.conf - echo '# You can understand this as server_name directive in Nginx.' >> mailcow.conf - echo '# Comma separated list without spaces! Example: ADDITIONAL_SERVER_NAMES=a.b.c,d.e.f' >> mailcow.conf - echo 'ADDITIONAL_SERVER_NAMES=' >> mailcow.conf - fi - elif [[ ${option} == "ACME_CONTACT" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo '# Lets Encrypt registration contact information' >> mailcow.conf - echo '# Optional: Leave empty for none' >> mailcow.conf - echo '# This value is only used on first order!' >> mailcow.conf - echo '# Setting it at a later point will require the following steps:' >> mailcow.conf - echo '# https://mailcow.github.io/mailcow-dockerized-docs/troubleshooting/debug-reset_tls/' >> mailcow.conf - echo 'ACME_CONTACT=' >> mailcow.conf - fi - elif [[ ${option} == "WEBAUTHN_ONLY_TRUSTED_VENDORS" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo "# WebAuthn device manufacturer verification" >> mailcow.conf - echo '# After setting WEBAUTHN_ONLY_TRUSTED_VENDORS=y only devices from trusted manufacturers are allowed' >> mailcow.conf - echo '# root certificates can be placed for validation under mailcow-dockerized/data/web/inc/lib/WebAuthn/rootCertificates' >> mailcow.conf - echo 'WEBAUTHN_ONLY_TRUSTED_VENDORS=n' >> mailcow.conf - fi -elif [[ ${option} == "WATCHDOG_VERBOSE" ]]; then - if ! grep -q ${option} mailcow.conf; then - echo '# Enable watchdog verbose logging' >> mailcow.conf - echo 'WATCHDOG_VERBOSE=n' >> mailcow.conf - fi - elif ! grep -q ${option} mailcow.conf; then - echo "Adding new option \"${option}\" to mailcow.conf" - echo "${option}=n" >> mailcow.conf - fi -done - -echo -en "Checking internet connection... " -if ! check_online_status; then - echo -e "\e[31mfailed\e[0m" - exit 1 -else - echo -e "\e[32mOK\e[0m" -fi - -echo -e "\e[32mChecking for newer update script...\e[0m" -SHA1_1=$(sha1sum update.sh) -git fetch origin #${BRANCH} -git checkout origin/${BRANCH} update.sh -SHA1_2=$(sha1sum update.sh) -if [[ ${SHA1_1} != ${SHA1_2} ]]; then - echo "update.sh changed, please run this script again, exiting." - chmod +x update.sh - exit 2 -fi - -if [[ -f mailcow.conf ]]; then - source mailcow.conf -else - echo -e "\e[31mNo mailcow.conf - is mailcow installed?\e[0m" - exit 1 -fi - -if [ ! $FORCE ]; then - read -r -p "Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N] " response - if [[ ! "${response}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then - echo "OK, exiting." - exit 0 - fi - migrate_docker_nat -fi - -echo -e "\e[32mValidating docker-compose stack configuration...\e[0m" -if ! docker-compose config -q; then - echo -e "\e[31m\nOh no, something went wrong. Please check the error message above.\e[0m" - exit 1 -fi - -echo -e "\e[32mChecking for conflicting bridges...\e[0m" -MAILCOW_BRIDGE=$(docker-compose config | grep -i com.docker.network.bridge.name | cut -d':' -f2) -while read NAT_ID; do - iptables -t nat -D POSTROUTING $NAT_ID -done < <(iptables -L -vn -t nat --line-numbers | grep $IPV4_NETWORK | grep -E 'MASQUERADE.*all' | grep -v ${MAILCOW_BRIDGE} | cut -d' ' -f1) - -DIFF_DIRECTORY=update_diffs -DIFF_FILE=${DIFF_DIRECTORY}/diff_before_update_$(date +"%Y-%m-%d-%H-%M-%S") -mv diff_before_update* ${DIFF_DIRECTORY}/ 2> /dev/null -if ! git diff-index --quiet HEAD; then - echo -e "\e[32mSaving diff to ${DIFF_FILE}...\e[0m" - mkdir -p ${DIFF_DIRECTORY} - git diff --stat > ${DIFF_FILE} - git diff >> ${DIFF_FILE} -fi - -echo -e "\e[32mPrefetching images...\e[0m" -prefetch_images - -echo -e "\e[32mStopping mailcow...\e[0m" -sleep 2 -MAILCOW_CONTAINERS=($(docker-compose ps -q)) -docker-compose down -echo -e "\e[32mChecking for remaining containers...\e[0m" -sleep 2 -for container in "${MAILCOW_CONTAINERS[@]}"; do - docker rm -f "$container" 2> /dev/null -done - -[[ -f data/conf/nginx/ZZZ-ejabberd.conf ]] && rm data/conf/nginx/ZZZ-ejabberd.conf - -# Silently fixing remote url from andryyy to mailcow -git remote set-url origin https://github.com/mailcow/mailcow-dockerized -echo -e "\e[32mCommitting current status...\e[0m" -[[ -z "$(git config user.name)" ]] && git config user.name moo -[[ -z "$(git config user.email)" ]] && git config user.email moo@cow.moo -[[ ! -z $(git ls-files data/conf/rspamd/override.d/worker-controller-password.inc) ]] && git rm data/conf/rspamd/override.d/worker-controller-password.inc -git add -u -git commit -am "Before update on ${DATE}" > /dev/null -echo -e "\e[32mFetching updated code from remote...\e[0m" -git fetch origin #${BRANCH} -echo -e "\e[32mMerging local with remote code (recursive, strategy: \"${MERGE_STRATEGY:-theirs}\", options: \"patience\"...\e[0m" -git config merge.defaultToUpstream true -git merge -X${MERGE_STRATEGY:-theirs} -Xpatience -m "After update on ${DATE}" -# Need to use a variable to not pass return codes of if checks -MERGE_RETURN=$? -if [[ ${MERGE_RETURN} == 128 ]]; then - echo -e "\e[31m\nOh no, what happened?\n=> You most likely added files to your local mailcow instance that were now added to the official mailcow repository. Please move them to another location before updating mailcow.\e[0m" - exit 1 -elif [[ ${MERGE_RETURN} == 1 ]]; then - echo -e "\e[93mPotenial conflict, trying to fix...\e[0m" - git status --porcelain | grep -E "UD|DU" | awk '{print $2}' | xargs rm -v - git add -A - git commit -m "After update on ${DATE}" > /dev/null - git checkout . - echo -e "\e[32mRemoved and recreated files if necessary.\e[0m" -elif [[ ${MERGE_RETURN} != 0 ]]; then - echo -e "\e[31m\nOh no, something went wrong. Please check the error message above.\e[0m" - echo - echo "Run docker-compose up -d to restart your stack without updates or try again after fixing the mentioned errors." - exit 1 -fi - -if [[ ${NO_UPDATE_COMPOSE} == "y" ]]; then - echo -e "\e[33mNot fetching latest docker-compose, please check for updates manually!\e[0m" -elif [[ -e /etc/alpine-release ]]; then - echo -e "\e[33mNot fetching latest docker-compose, because you are using Alpine Linux without glibc support. Please update docker-compose via apk!\e[0m" -else - echo -e "\e[32mFetching new docker-compose version...\e[0m" - echo -e "\e[32mTrying to determine GLIBC version...\e[0m" - if ldd --version > /dev/null; then - GLIBC_V=$(ldd --version | grep -E '(GLIBC|GNU libc)' | rev | cut -d ' ' -f1 | rev | cut -d '.' -f2) - if [ ! -z "${GLIBC_V}" ] && [ ${GLIBC_V} -gt 27 ]; then - DC_DL_SUFFIX= - else - DC_DL_SUFFIX=legacy - fi - else - DC_DL_SUFFIX=legacy - fi - sleep 1 - if [[ ! -z $(which pip) && $(pip list --local 2>&1 | grep -v DEPRECATION | grep -c docker-compose) == 1 ]]; then - true - #prevent breaking a working docker-compose installed with pip - elif [[ $(curl -sL -w "%{http_code}" https://www.servercow.de/docker-compose/latest.php?vers=${DC_DL_SUFFIX} -o /dev/null) == "200" ]]; then - LATEST_COMPOSE=$(curl -#L https://www.servercow.de/docker-compose/latest.php) - COMPOSE_VERSION=$(docker-compose version --short) - if [[ "$LATEST_COMPOSE" != "$COMPOSE_VERSION" ]]; then - COMPOSE_PATH=$(which docker-compose) - if [[ -w ${COMPOSE_PATH} ]]; then - curl -#L https://github.com/docker/compose/releases/download/${LATEST_COMPOSE}/docker-compose-$(uname -s)-$(uname -m) > $COMPOSE_PATH - chmod +x $COMPOSE_PATH - else - echo -e "\e[33mWARNING: $COMPOSE_PATH is not writable, but new version $LATEST_COMPOSE is available (installed: $COMPOSE_VERSION)\e[0m" - fi - fi - else - echo -e "\e[33mCannot determine latest docker-compose version, skipping...\e[0m" - fi -fi - -echo -e "\e[32mFetching new images, if any...\e[0m" -sleep 2 -docker-compose pull - -# Fix missing SSL, does not overwrite existing files -[[ ! -d data/assets/ssl ]] && mkdir -p data/assets/ssl -cp -n -d data/assets/ssl-example/*.pem data/assets/ssl/ - -echo -e "Checking IPv6 settings... " -if grep -q 'SYSCTL_IPV6_DISABLED=1' mailcow.conf; then - echo - echo '!! IMPORTANT !!' - echo - echo 'SYSCTL_IPV6_DISABLED was removed due to complications. IPv6 can be disabled by editing "docker-compose.yml" and setting "enable_ipv6: true" to "enable_ipv6: false".' - echo 'This setting will only be active after a complete shutdown of mailcow by running "docker-compose down" followed by "docker-compose up -d".' - echo - echo '!! IMPORTANT !!' - echo - read -p "Press any key to continue..." < /dev/tty -fi - -# Checking for old project name bug -sed -i --follow-symlinks 's#COMPOSEPROJECT_NAME#COMPOSE_PROJECT_NAME#g' mailcow.conf -# Checking old, wrong bindings -sed -i --follow-symlinks 's/HTTP_BIND=0.0.0.0/HTTP_BIND=/g' mailcow.conf -sed -i --follow-symlinks 's/HTTPS_BIND=0.0.0.0/HTTPS_BIND=/g' mailcow.conf - -# Fix Rspamd maps -if [ -f data/conf/rspamd/custom/global_from_blacklist.map ]; then - mv data/conf/rspamd/custom/global_from_blacklist.map data/conf/rspamd/custom/global_smtp_from_blacklist.map -fi -if [ -f data/conf/rspamd/custom/global_from_whitelist.map ]; then - mv data/conf/rspamd/custom/global_from_whitelist.map data/conf/rspamd/custom/global_smtp_from_whitelist.map -fi - -# Fix deprecated metrics.conf -if [ -f "data/conf/rspamd/local.d/metrics.conf" ]; then - if [ ! -z "$(git diff --name-only origin/master data/conf/rspamd/local.d/metrics.conf)" ]; then - echo -e "\e[33mWARNING\e[0m - Please migrate your customizations of data/conf/rspamd/local.d/metrics.conf to actions.conf and groups.conf after this update." - echo "The deprecated configuration file metrics.conf will be moved to metrics.conf_deprecated after updating mailcow." - fi - mv data/conf/rspamd/local.d/metrics.conf data/conf/rspamd/local.d/metrics.conf_deprecated -fi - -# Set app_info.inc.php -mailcow_git_version=$(git describe --tags `git rev-list --tags --max-count=1`) -if [ $? -eq 0 ]; then - mailcow_git_url=$(git config --get remote.origin.url) - echo ' data/web/inc/app_info.inc.php - echo ' $MAILCOW_GIT_VERSION="'$mailcow_git_version'";' >> data/web/inc/app_info.inc.php - echo ' $MAILCOW_GIT_URL="'$mailcow_git_url'";' >> data/web/inc/app_info.inc.php - echo '?>' >> data/web/inc/app_info.inc.php -else - echo ' data/web/inc/app_info.inc.php - echo ' $MAILCOW_GIT_VERSION="";' >> data/web/inc/app_info.inc.php - echo ' $MAILCOW_GIT_URL="";' >> data/web/inc/app_info.inc.php - echo '?>' >> data/web/inc/app_info.inc.php - echo -e "\e[33mCannot determine current git repository version...\e[0m" -fi - -if [[ ${SKIP_START} == "y" ]]; then - echo -e "\e[33mNot starting mailcow, please run \"docker-compose up -d --remove-orphans\" to start mailcow.\e[0m" -else - echo -e "\e[32mStarting mailcow...\e[0m" - sleep 2 - docker-compose up -d --remove-orphans -fi - -echo -e "\e[32mCollecting garbage...\e[0m" -docker_garbage - -# Run post-update-hook -if [ -f "${SCRIPT_DIR}/post_update_hook.sh" ]; then - bash "${SCRIPT_DIR}/post_update_hook.sh" -fi - -#echo "In case you encounter any problem, hard-reset to a state before updating mailcow:" -#echo -#git reflog --color=always | grep "Before update on " -#echo -#echo "Use \"git reset --hard hash-on-the-left\" and run docker-compose up -d afterwards." From f3f6fb890857f49a25dc675a9d327e33e8183b21 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com> Date: Wed, 26 Jan 2022 11:16:25 +0100 Subject: [PATCH 05/36] [Web] add github version tag error handling --- generate_config.sh | 379 +++++++++++++++++++++++ update.sh | 758 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1137 insertions(+) create mode 100755 generate_config.sh create mode 100755 update.sh diff --git a/generate_config.sh b/generate_config.sh new file mode 100755 index 00000000..6bef72ea --- /dev/null +++ b/generate_config.sh @@ -0,0 +1,379 @@ +#!/usr/bin/env bash + +set -o pipefail + +if [[ "$(uname -r)" =~ ^4\.15\.0-60 ]]; then + echo "DO NOT RUN mailcow ON THIS UBUNTU KERNEL!"; + echo "Please update to 5.x or use another distribution." + exit 1 +fi + +if [[ "$(uname -r)" =~ ^4\.4\. ]]; then + if grep -q Ubuntu <<< $(uname -a); then + echo "DO NOT RUN mailcow ON THIS UBUNTU KERNEL!"; + echo "Please update to linux-generic-hwe-16.04 by running \"apt-get install --install-recommends linux-generic-hwe-16.04\"" + exit 1 + fi +fi + +if grep --help 2>&1 | grep -q -i "busybox"; then + echo "BusyBox grep detected, please install gnu grep, \"apk add --no-cache --upgrade grep\"" + exit 1 +fi +if cp --help 2>&1 | grep -q -i "busybox"; then + echo "BusyBox cp detected, please install coreutils, \"apk add --no-cache --upgrade coreutils\"" + exit 1 +fi + +for bin in openssl curl docker-compose docker git awk sha1sum; do + if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi +done + +if [ -f mailcow.conf ]; then + read -r -p "A config file exists and will be overwritten, are you sure you want to continue? [y/N] " response + case $response in + [yY][eE][sS]|[yY]) + mv mailcow.conf mailcow.conf_backup + chmod 600 mailcow.conf_backup + ;; + *) + exit 1 + ;; + esac +fi + +echo "Press enter to confirm the detected value '[value]' where applicable or enter a custom value." +while [ -z "${MAILCOW_HOSTNAME}" ]; do + read -p "Mail server hostname (FQDN) - this is not your mail domain, but your mail servers hostname: " -e MAILCOW_HOSTNAME + DOTS=${MAILCOW_HOSTNAME//[^.]}; + if [ ${#DOTS} -lt 2 ] && [ ! -z ${MAILCOW_HOSTNAME} ]; then + echo "${MAILCOW_HOSTNAME} is not a FQDN" + MAILCOW_HOSTNAME= + fi +done + +if [ -a /etc/timezone ]; then + DETECTED_TZ=$(cat /etc/timezone) +elif [ -a /etc/localtime ]; then + DETECTED_TZ=$(readlink /etc/localtime|sed -n 's|^.*zoneinfo/||p') +fi + +while [ -z "${MAILCOW_TZ}" ]; do + if [ -z "${DETECTED_TZ}" ]; then + read -p "Timezone: " -e MAILCOW_TZ + else + read -p "Timezone [${DETECTED_TZ}]: " -e MAILCOW_TZ + [ -z "${MAILCOW_TZ}" ] && MAILCOW_TZ=${DETECTED_TZ} + fi +done + +MEM_TOTAL=$(awk '/MemTotal/ {print $2}' /proc/meminfo) + +if [ ${MEM_TOTAL} -le "2621440" ]; then + echo "Installed memory is <= 2.5 GiB. It is recommended to disable ClamAV to prevent out-of-memory situations." + echo "ClamAV can be re-enabled by setting SKIP_CLAMD=n in mailcow.conf." + read -r -p "Do you want to disable ClamAV now? [Y/n] " response + case $response in + [nN][oO]|[nN]) + SKIP_CLAMD=n + ;; + *) + SKIP_CLAMD=y + ;; + esac +else + SKIP_CLAMD=n +fi + +if [ ${MEM_TOTAL} -le "2097152" ]; then + echo "Disabling Solr on low-memory system." + SKIP_SOLR=y +elif [ ${MEM_TOTAL} -le "3670016" ]; then + echo "Installed memory is <= 3.5 GiB. It is recommended to disable Solr to prevent out-of-memory situations." + echo "Solr is a prone to run OOM and should be monitored. The default Solr heap size is 1024 MiB and should be set in mailcow.conf according to your expected load." + echo "Solr can be re-enabled by setting SKIP_SOLR=n in mailcow.conf but will refuse to start with less than 2 GB total memory." + read -r -p "Do you want to disable Solr now? [Y/n] " response + case $response in + [nN][oO]|[nN]) + SKIP_SOLR=n + ;; + *) + SKIP_SOLR=y + ;; + esac +else + SKIP_SOLR=n +fi + +[ ! -f ./data/conf/rspamd/override.d/worker-controller-password.inc ] && echo '# Placeholder' > ./data/conf/rspamd/override.d/worker-controller-password.inc + +cat << EOF > mailcow.conf +# ------------------------------ +# mailcow web ui configuration +# ------------------------------ +# example.org is _not_ a valid hostname, use a fqdn here. +# Default admin user is "admin" +# Default password is "moohoo" + +MAILCOW_HOSTNAME=${MAILCOW_HOSTNAME} + +# Password hash algorithm +# Only certain password hash algorithm are supported. For a fully list of supported schemes, +# see https://mailcow.github.io/mailcow-dockerized-docs/models/model-passwd/ +MAILCOW_PASS_SCHEME=BLF-CRYPT + +# ------------------------------ +# SQL database configuration +# ------------------------------ + +DBNAME=mailcow +DBUSER=mailcow + +# Please use long, random alphanumeric strings (A-Za-z0-9) + +DBPASS=$(LC_ALL=C data/web/inc/app_info.inc.php + echo ' $MAILCOW_GIT_VERSION="'$mailcow_git_version'";' >> data/web/inc/app_info.inc.php + echo ' $MAILCOW_GIT_URL="'$mailcow_git_url'";' >> data/web/inc/app_info.inc.php + echo '?>' >> data/web/inc/app_info.inc.php +else + echo ' data/web/inc/app_info.inc.php + echo ' $MAILCOW_GIT_VERSION="";' >> data/web/inc/app_info.inc.php + echo ' $MAILCOW_GIT_URL="";' >> data/web/inc/app_info.inc.php + echo '?>' >> data/web/inc/app_info.inc.php + echo -e "\e[33mCannot determine current git repository version...\e[0m" +fi diff --git a/update.sh b/update.sh new file mode 100755 index 00000000..033aa140 --- /dev/null +++ b/update.sh @@ -0,0 +1,758 @@ +#!/usr/bin/env bash + +# Check permissions +if [ "$(id -u)" -ne "0" ]; then + echo "You need to be root" + exit 1 +fi + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Run pre-update-hook +if [ -f "${SCRIPT_DIR}/pre_update_hook.sh" ]; then + bash "${SCRIPT_DIR}/pre_update_hook.sh" +fi + +if [[ "$(uname -r)" =~ ^4\.15\.0-60 ]]; then + echo "DO NOT RUN mailcow ON THIS UBUNTU KERNEL!"; + echo "Please update to 5.x or use another distribution." + exit 1 +fi + +if [[ "$(uname -r)" =~ ^4\.4\. ]]; then + if grep -q Ubuntu <<< $(uname -a); then + echo "DO NOT RUN mailcow ON THIS UBUNTU KERNEL!" + echo "Please update to linux-generic-hwe-16.04 by running \"apt-get install --install-recommends linux-generic-hwe-16.04\"" + exit 1 + fi + echo "mailcow on a 4.4.x kernel is not supported. It may or may not work, please upgrade your kernel or continue at your own risk." + read -p "Press any key to continue..." < /dev/tty +fi + +# Exit on error and pipefail +set -o pipefail + +# Setting high dc timeout +export COMPOSE_HTTP_TIMEOUT=600 + +# Add /opt/bin to PATH +PATH=$PATH:/opt/bin + +umask 0022 + +for bin in curl docker-compose docker git awk sha1sum; do + if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi +done + +export LC_ALL=C +DATE=$(date +%Y-%m-%d_%H_%M_%S) +BRANCH=$(cd ${SCRIPT_DIR}; git rev-parse --abbrev-ref HEAD) + +check_online_status() { + CHECK_ONLINE_IPS=(1.1.1.1 9.9.9.9 8.8.8.8) + for ip in "${CHECK_ONLINE_IPS[@]}"; do + if timeout 3 ping -c 1 ${ip} > /dev/null; then + return 0 + fi + done + return 1 +} + +prefetch_images() { + [[ -z ${BRANCH} ]] && { echo -e "\e[33m\nUnknown branch...\e[0m"; exit 1; } + git fetch origin #${BRANCH} + while read image; do + if [[ "${image}" == "robbertkl/ipv6nat" ]]; then + if ! grep -qi "ipv6nat-mailcow" docker-compose.yml || grep -qi "enable_ipv6: false" docker-compose.yml; then + continue + fi + fi + RET_C=0 + until docker pull ${image}; do + RET_C=$((RET_C + 1)) + echo -e "\e[33m\nError pulling $image, retrying...\e[0m" + [ ${RET_C} -gt 3 ] && { echo -e "\e[31m\nToo many failed retries, exiting\e[0m"; exit 1; } + sleep 1 + done + done < <(git show origin/${BRANCH}:docker-compose.yml | grep "image:" | awk '{ gsub("image:","", $3); print $2 }') +} + +docker_garbage() { + IMGS_TO_DELETE=() + for container in $(grep -oP "image: \Kmailcow.+" "${SCRIPT_DIR}/docker-compose.yml"); do + REPOSITORY=${container/:*} + TAG=${container/*:} + V_MAIN=${container/*.} + V_SUB=${container/*.} + EXISTING_TAGS=$(docker images | grep ${REPOSITORY} | awk '{ print $2 }') + for existing_tag in ${EXISTING_TAGS[@]}; do + V_MAIN_EXISTING=${existing_tag/*.} + V_SUB_EXISTING=${existing_tag/*.} + # Not an integer + [[ ! $V_MAIN_EXISTING =~ ^[0-9]+$ ]] && continue + [[ ! $V_SUB_EXISTING =~ ^[0-9]+$ ]] && continue + + if [[ $V_MAIN_EXISTING == "latest" ]]; then + echo "Found deprecated label \"latest\" for repository $REPOSITORY, it should be deleted." + IMGS_TO_DELETE+=($REPOSITORY:$existing_tag) + elif [[ $V_MAIN_EXISTING -lt $V_MAIN ]]; then + echo "Found tag $existing_tag for $REPOSITORY, which is older than the current tag $TAG and should be deleted." + IMGS_TO_DELETE+=($REPOSITORY:$existing_tag) + elif [[ $V_SUB_EXISTING -lt $V_SUB ]]; then + echo "Found tag $existing_tag for $REPOSITORY, which is older than the current tag $TAG and should be deleted." + IMGS_TO_DELETE+=($REPOSITORY:$existing_tag) + fi + done + done + + if [[ ! -z ${IMGS_TO_DELETE[*]} ]]; then + echo "Run the following command to delete unused image tags:" + echo + echo " docker rmi ${IMGS_TO_DELETE[*]}" + echo + if [ ! $FORCE ]; then + read -r -p "Do you want to delete old image tags right now? [y/N] " response + if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then + docker rmi ${IMGS_TO_DELETE[*]} + else + echo "OK, skipped." + fi + else + echo "Running image removal without extra confirmation due to force mode." + docker rmi ${IMGS_TO_DELETE[*]} + fi + echo -e "\e[32mFurther cleanup...\e[0m" + echo "If you want to cleanup further garbage collected by Docker, please make sure all containers are up and running before cleaning your system by executing \"docker system prune\"" + fi +} + +in_array() { + local e match="$1" + shift + for e; do [[ "$e" == "$match" ]] && return 0; done + return 1 +} + +migrate_docker_nat() { + NAT_CONFIG='{"ipv6":true,"fixed-cidr-v6":"fd00:dead:beef:c0::/80","experimental":true,"ip6tables":true}' + # Min Docker version + DOCKERV_REQ=20.10.2 + # Current Docker version + DOCKERV_CUR=$(docker version -f '{{.Server.Version}}') + if grep -qi "ipv6nat-mailcow" docker-compose.yml && grep -qi "enable_ipv6: true" docker-compose.yml; then + echo -e "\e[32mNative IPv6 implementation available.\e[0m" + echo "This will enable experimental features in the Docker daemon and configure Docker to do the IPv6 NATing instead of ipv6nat-mailcow." + echo '!!! This step is recommended !!!' + echo "mailcow will try to roll back the changes if starting Docker fails after modifying the daemon.json configuration file." + read -r -p "Should we try to enable the native IPv6 implementation in Docker now (recommended)? [y/N] " dockernatresponse + if [[ ! "${dockernatresponse}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then + echo "OK, skipping this step." + return 0 + fi + fi + # Sort versions and check if we are running a newer or equal version to req + if [ $(printf "${DOCKERV_REQ}\n${DOCKERV_CUR}" | sort -V | tail -n1) == "${DOCKERV_CUR}" ]; then + # If Dockerd daemon json exists + if [ -s /etc/docker/daemon.json ]; then + IFS=',' read -r -a dockerconfig <<< $(cat /etc/docker/daemon.json | tr -cd '[:alnum:],') + if ! in_array ipv6true "${dockerconfig[@]}" || \ + ! in_array experimentaltrue "${dockerconfig[@]}" || \ + ! in_array ip6tablestrue "${dockerconfig[@]}" || \ + ! grep -qi "fixed-cidr-v6" /etc/docker/daemon.json; then + echo -e "\e[33mWarning:\e[0m You seem to have modified the /etc/docker/daemon.json configuration by yourself and not fully/correctly activated the native IPv6 NAT implementation." + echo "You will need to merge your existing configuration manually or fix/delete the existing daemon.json configuration before trying the update process again." + echo -e "Please merge the following content and restart the Docker daemon:\n" + echo ${NAT_CONFIG} + return 1 + fi + else + echo "Working on IPv6 NAT, please wait..." + echo ${NAT_CONFIG} > /etc/docker/daemon.json + ip6tables -F -t nat + [[ -e /etc/alpine-release ]] && rc-service docker restart || systemctl restart docker.service + if [[ $? -ne 0 ]]; then + echo -e "\e[31mError:\e[0m Failed to activate IPv6 NAT! Reverting and exiting." + rm /etc/docker/daemon.json + if [[ -e /etc/alpine-release ]]; then + rc-service docker restart + else + systemctl reset-failed docker.service + systemctl restart docker.service + fi + return 1 + fi + fi + # Removing legacy container + sed -i '/ipv6nat-mailcow:$/,/^$/d' docker-compose.yml + if [ -s docker-compose.override.yml ]; then + sed -i '/ipv6nat-mailcow:$/,/^$/d' docker-compose.override.yml + if [[ "$(cat docker-compose.override.yml | sed '/^\s*$/d' | wc -l)" == "2" ]]; then + mv docker-compose.override.yml docker-compose.override.yml_backup + fi + fi + echo -e "\e[32mGreat! \e[0mNative IPv6 NAT is active.\e[0m" + else + echo -e "\e[31mPlease upgrade Docker to version ${DOCKERV_REQ} or above.\e[0m" + return 0 + fi +} + +while (($#)); do + case "${1}" in + --check|-c) + echo "Checking remote code for updates..." + LATEST_REV=$(git ls-remote --exit-code --refs --quiet https://github.com/mailcow/mailcow-dockerized ${BRANCH} | cut -f1) + if [ $? -ne 0 ]; then + echo "A problem occurred while trying to fetch the latest revision from github." + exit 99 + fi + if [[ -z $(git log HEAD --pretty=format:"%H" | grep "${LATEST_REV}") ]]; then + echo -e "Updated code is available.\nThe changes can be found here: https://github.com/mailcow/mailcow-dockerized/commits/master" + git log --date=short --pretty=format:"%ad - %s" $(git rev-parse --short HEAD)..origin/master + exit 0 + else + echo "No updates available." + exit 3 + fi + ;; + --ours) + MERGE_STRATEGY=ours + ;; + --skip-start) + SKIP_START=y + ;; + --gc) + echo -e "\e[32mCollecting garbage...\e[0m" + docker_garbage + exit 0 + ;; + --prefetch) + echo -e "\e[32mPrefetching images...\e[0m" + prefetch_images + exit 0 + ;; + -f|--force) + echo -e "\e[32mRunning in forced mode...\e[0m" + FORCE=y + ;; + --no-update-compose) + NO_UPDATE_COMPOSE=y + ;; + --help|-h) + echo './update.sh [-c|--check, --ours, --gc, --no-update-compose, --prefetch, --skip-start, -f|--force, -h|--help] + + -c|--check - Check for updates and exit (exit codes => 0: update available, 3: no updates) + --ours - Use merge strategy option "ours" to solve conflicts in favor of non-mailcow code (local changes over remote changes), not recommended! + --gc - Run garbage collector to delete old image tags + --no-update-compose - Do not update docker-compose + --prefetch - Only prefetch new images and exit (useful to prepare updates) + --skip-start - Do not start mailcow after update + -f|--force - Force update, do not ask questions +' + exit 1 + esac + shift +done + +[[ ! -f mailcow.conf ]] && { echo "mailcow.conf is missing"; exit 1;} +chmod 600 mailcow.conf +source mailcow.conf +DOTS=${MAILCOW_HOSTNAME//[^.]}; +if [ ${#DOTS} -lt 2 ]; then + echo "MAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is not a FQDN!" + echo "Please change it to a FQDN and run docker-compose down followed by docker-compose up -d" + exit 1 +fi + +if grep --help 2>&1 | head -n 1 | grep -q -i "busybox"; then echo "BusyBox grep detected, please install gnu grep, \"apk add --no-cache --upgrade grep\""; exit 1; fi +# This will also cover sort +if cp --help 2>&1 | head -n 1 | grep -q -i "busybox"; then echo "BusyBox cp detected, please install coreutils, \"apk add --no-cache --upgrade coreutils\""; exit 1; fi +if sed --help 2>&1 | head -n 1 | grep -q -i "busybox"; then echo "BusyBox sed detected, please install gnu sed, \"apk add --no-cache --upgrade sed\""; exit 1; fi + +CONFIG_ARRAY=( + "SKIP_LETS_ENCRYPT" + "SKIP_SOGO" + "USE_WATCHDOG" + "WATCHDOG_NOTIFY_EMAIL" + "WATCHDOG_NOTIFY_BAN" + "WATCHDOG_EXTERNAL_CHECKS" + "WATCHDOG_SUBJECT" + "SKIP_CLAMD" + "SKIP_IP_CHECK" + "ADDITIONAL_SAN" + "DOVEADM_PORT" + "IPV4_NETWORK" + "IPV6_NETWORK" + "LOG_LINES" + "SNAT_TO_SOURCE" + "SNAT6_TO_SOURCE" + "COMPOSE_PROJECT_NAME" + "SQL_PORT" + "API_KEY" + "API_KEY_READ_ONLY" + "API_ALLOW_FROM" + "MAILDIR_GC_TIME" + "MAILDIR_SUB" + "ACL_ANYONE" + "SOLR_HEAP" + "SKIP_SOLR" + "ENABLE_SSL_SNI" + "ALLOW_ADMIN_EMAIL_LOGIN" + "SKIP_HTTP_VERIFICATION" + "SOGO_EXPIRE_SESSION" + "REDIS_PORT" + "DOVECOT_MASTER_USER" + "DOVECOT_MASTER_PASS" + "MAILCOW_PASS_SCHEME" + "ADDITIONAL_SERVER_NAMES" + "ACME_CONTACT" + "WATCHDOG_VERBOSE" + "WEBAUTHN_ONLY_TRUSTED_VENDORS" +) + +sed -i --follow-symlinks '$a\' mailcow.conf +for option in ${CONFIG_ARRAY[@]}; do + if [[ ${option} == "ADDITIONAL_SAN" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo "${option}=" >> mailcow.conf + fi + elif [[ ${option} == "COMPOSE_PROJECT_NAME" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo "COMPOSE_PROJECT_NAME=mailcowdockerized" >> mailcow.conf + fi + elif [[ ${option} == "DOVEADM_PORT" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo "DOVEADM_PORT=127.0.0.1:19991" >> mailcow.conf + fi + elif [[ ${option} == "WATCHDOG_NOTIFY_EMAIL" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo "WATCHDOG_NOTIFY_EMAIL=" >> mailcow.conf + fi + elif [[ ${option} == "LOG_LINES" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Max log lines per service to keep in Redis logs' >> mailcow.conf + echo "LOG_LINES=9999" >> mailcow.conf + fi + elif [[ ${option} == "IPV4_NETWORK" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Internal IPv4 /24 subnet, format n.n.n. (expands to n.n.n.0/24)' >> mailcow.conf + echo "IPV4_NETWORK=172.22.1" >> mailcow.conf + fi + elif [[ ${option} == "IPV6_NETWORK" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Internal IPv6 subnet in fc00::/7' >> mailcow.conf + echo "IPV6_NETWORK=fd4d:6169:6c63:6f77::/64" >> mailcow.conf + fi + elif [[ ${option} == "SQL_PORT" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Bind SQL to 127.0.0.1 on port 13306' >> mailcow.conf + echo "SQL_PORT=127.0.0.1:13306" >> mailcow.conf + fi + elif [[ ${option} == "API_KEY" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Create or override API key for web UI' >> mailcow.conf + echo "#API_KEY=" >> mailcow.conf + fi + elif [[ ${option} == "API_KEY_READ_ONLY" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Create or override read-only API key for web UI' >> mailcow.conf + echo "#API_KEY_READ_ONLY=" >> mailcow.conf + fi + elif [[ ${option} == "API_ALLOW_FROM" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Must be set for API_KEY to be active' >> mailcow.conf + echo '# IPs only, no networks (networks can be set via UI)' >> mailcow.conf + echo "#API_ALLOW_FROM=" >> mailcow.conf + fi + elif [[ ${option} == "SNAT_TO_SOURCE" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Use this IPv4 for outgoing connections (SNAT)' >> mailcow.conf + echo "#SNAT_TO_SOURCE=" >> mailcow.conf + fi + elif [[ ${option} == "SNAT6_TO_SOURCE" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Use this IPv6 for outgoing connections (SNAT)' >> mailcow.conf + echo "#SNAT6_TO_SOURCE=" >> mailcow.conf + fi + elif [[ ${option} == "MAILDIR_GC_TIME" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Garbage collector cleanup' >> mailcow.conf + echo '# Deleted domains and mailboxes are moved to /var/vmail/_garbage/timestamp_sanitizedstring' >> mailcow.conf + echo '# How long should objects remain in the garbage until they are being deleted? (value in minutes)' >> mailcow.conf + echo '# Check interval is hourly' >> mailcow.conf + echo 'MAILDIR_GC_TIME=1440' >> mailcow.conf + fi + elif [[ ${option} == "ACL_ANYONE" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Set this to "allow" to enable the anyone pseudo user. Disabled by default.' >> mailcow.conf + echo '# When enabled, ACL can be created, that apply to "All authenticated users"' >> mailcow.conf + echo '# This should probably only be activated on mail hosts, that are used exclusivly by one organisation.' >> mailcow.conf + echo '# Otherwise a user might share data with too many other users.' >> mailcow.conf + echo 'ACL_ANYONE=disallow' >> mailcow.conf + fi + elif [[ ${option} == "SOLR_HEAP" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Solr heap size, there is no recommendation, please see Solr docs.' >> mailcow.conf + echo '# Solr is a prone to run OOM on large systems and should be monitored. Unmonitored Solr setups are not recommended.' >> mailcow.conf + echo '# Solr will refuse to start with total system memory below or equal to 2 GB.' >> mailcow.conf + echo "SOLR_HEAP=1024" >> mailcow.conf + fi + elif [[ ${option} == "SKIP_SOLR" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Solr is disabled by default after upgrading from non-Solr to Solr-enabled mailcows.' >> mailcow.conf + echo '# Disable Solr or if you do not want to store a readable index of your mails in solr-vol-1.' >> mailcow.conf + echo "SKIP_SOLR=y" >> mailcow.conf + fi + elif [[ ${option} == "ENABLE_SSL_SNI" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Create seperate certificates for all domains - y/n' >> mailcow.conf + echo '# this will allow adding more than 100 domains, but some email clients will not be able to connect with alternative hostnames' >> mailcow.conf + echo '# see https://wiki.dovecot.org/SSL/SNIClientSupport' >> mailcow.conf + echo "ENABLE_SSL_SNI=n" >> mailcow.conf + fi + elif [[ ${option} == "SKIP_SOGO" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Skip SOGo: Will disable SOGo integration and therefore webmail, DAV protocols and ActiveSync support (experimental, unsupported, not fully implemented) - y/n' >> mailcow.conf + echo "SKIP_SOGO=n" >> mailcow.conf + fi + elif [[ ${option} == "MAILDIR_SUB" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# MAILDIR_SUB defines a path in a users virtual home to keep the maildir in. Leave empty for updated setups.' >> mailcow.conf + echo "#MAILDIR_SUB=Maildir" >> mailcow.conf + echo "MAILDIR_SUB=" >> mailcow.conf + fi + elif [[ ${option} == "WATCHDOG_NOTIFY_BAN" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Notify about banned IP. Includes whois lookup.' >> mailcow.conf + echo "WATCHDOG_NOTIFY_BAN=y" >> mailcow.conf + fi + elif [[ ${option} == "WATCHDOG_SUBJECT" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Subject for watchdog mails. Defaults to "Watchdog ALERT" followed by the error message.' >> mailcow.conf + echo "#WATCHDOG_SUBJECT=" >> mailcow.conf + fi + elif [[ ${option} == "WATCHDOG_EXTERNAL_CHECKS" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Checks if mailcow is an open relay. Requires a SAL. More checks will follow.' >> mailcow.conf + echo '# No data is collected. Opt-in and anonymous.' >> mailcow.conf + echo '# Will only work with unmodified mailcow setups.' >> mailcow.conf + echo "WATCHDOG_EXTERNAL_CHECKS=n" >> mailcow.conf + fi + elif [[ ${option} == "SOGO_EXPIRE_SESSION" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# SOGo session timeout in minutes' >> mailcow.conf + echo "SOGO_EXPIRE_SESSION=480" >> mailcow.conf + fi + elif [[ ${option} == "REDIS_PORT" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo "REDIS_PORT=127.0.0.1:7654" >> mailcow.conf + fi + elif [[ ${option} == "DOVECOT_MASTER_USER" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# DOVECOT_MASTER_USER and _PASS must _both_ be provided. No special chars.' >> mailcow.conf + echo '# Empty by default to auto-generate master user and password on start.' >> mailcow.conf + echo '# User expands to DOVECOT_MASTER_USER@mailcow.local' >> mailcow.conf + echo '# LEAVE EMPTY IF UNSURE' >> mailcow.conf + echo "DOVECOT_MASTER_USER=" >> mailcow.conf + fi + elif [[ ${option} == "DOVECOT_MASTER_PASS" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# LEAVE EMPTY IF UNSURE' >> mailcow.conf + echo "DOVECOT_MASTER_PASS=" >> mailcow.conf + fi + elif [[ ${option} == "MAILCOW_PASS_SCHEME" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo '# Password hash algorithm' >> mailcow.conf + echo '# Only certain password hash algorithm are supported. For a fully list of supported schemes,' >> mailcow.conf + echo '# see https://mailcow.github.io/mailcow-dockerized-docs/models/model-passwd/' >> mailcow.conf + echo "MAILCOW_PASS_SCHEME=BLF-CRYPT" >> mailcow.conf + fi + elif [[ ${option} == "ADDITIONAL_SERVER_NAMES" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo '# Additional server names for mailcow UI' >> mailcow.conf + echo '#' >> mailcow.conf + echo '# Specify alternative addresses for the mailcow UI to respond to' >> mailcow.conf + echo '# This is useful when you set mail.* as ADDITIONAL_SAN and want to make sure mail.maildomain.com will always point to the mailcow UI.' >> mailcow.conf + echo '# If the server name does not match a known site, Nginx decides by best-guess and may redirect users to the wrong web root.' >> mailcow.conf + echo '# You can understand this as server_name directive in Nginx.' >> mailcow.conf + echo '# Comma separated list without spaces! Example: ADDITIONAL_SERVER_NAMES=a.b.c,d.e.f' >> mailcow.conf + echo 'ADDITIONAL_SERVER_NAMES=' >> mailcow.conf + fi + elif [[ ${option} == "ACME_CONTACT" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo '# Lets Encrypt registration contact information' >> mailcow.conf + echo '# Optional: Leave empty for none' >> mailcow.conf + echo '# This value is only used on first order!' >> mailcow.conf + echo '# Setting it at a later point will require the following steps:' >> mailcow.conf + echo '# https://mailcow.github.io/mailcow-dockerized-docs/troubleshooting/debug-reset_tls/' >> mailcow.conf + echo 'ACME_CONTACT=' >> mailcow.conf + fi + elif [[ ${option} == "WEBAUTHN_ONLY_TRUSTED_VENDORS" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo "# WebAuthn device manufacturer verification" >> mailcow.conf + echo '# After setting WEBAUTHN_ONLY_TRUSTED_VENDORS=y only devices from trusted manufacturers are allowed' >> mailcow.conf + echo '# root certificates can be placed for validation under mailcow-dockerized/data/web/inc/lib/WebAuthn/rootCertificates' >> mailcow.conf + echo 'WEBAUTHN_ONLY_TRUSTED_VENDORS=n' >> mailcow.conf + fi +elif [[ ${option} == "WATCHDOG_VERBOSE" ]]; then + if ! grep -q ${option} mailcow.conf; then + echo '# Enable watchdog verbose logging' >> mailcow.conf + echo 'WATCHDOG_VERBOSE=n' >> mailcow.conf + fi + elif ! grep -q ${option} mailcow.conf; then + echo "Adding new option \"${option}\" to mailcow.conf" + echo "${option}=n" >> mailcow.conf + fi +done + +echo -en "Checking internet connection... " +if ! check_online_status; then + echo -e "\e[31mfailed\e[0m" + exit 1 +else + echo -e "\e[32mOK\e[0m" +fi + +echo -e "\e[32mChecking for newer update script...\e[0m" +SHA1_1=$(sha1sum update.sh) +git fetch origin #${BRANCH} +git checkout origin/${BRANCH} update.sh +SHA1_2=$(sha1sum update.sh) +if [[ ${SHA1_1} != ${SHA1_2} ]]; then + echo "update.sh changed, please run this script again, exiting." + chmod +x update.sh + exit 2 +fi + +if [[ -f mailcow.conf ]]; then + source mailcow.conf +else + echo -e "\e[31mNo mailcow.conf - is mailcow installed?\e[0m" + exit 1 +fi + +if [ ! $FORCE ]; then + read -r -p "Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N] " response + if [[ ! "${response}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then + echo "OK, exiting." + exit 0 + fi + migrate_docker_nat +fi + +echo -e "\e[32mValidating docker-compose stack configuration...\e[0m" +if ! docker-compose config -q; then + echo -e "\e[31m\nOh no, something went wrong. Please check the error message above.\e[0m" + exit 1 +fi + +echo -e "\e[32mChecking for conflicting bridges...\e[0m" +MAILCOW_BRIDGE=$(docker-compose config | grep -i com.docker.network.bridge.name | cut -d':' -f2) +while read NAT_ID; do + iptables -t nat -D POSTROUTING $NAT_ID +done < <(iptables -L -vn -t nat --line-numbers | grep $IPV4_NETWORK | grep -E 'MASQUERADE.*all' | grep -v ${MAILCOW_BRIDGE} | cut -d' ' -f1) + +DIFF_DIRECTORY=update_diffs +DIFF_FILE=${DIFF_DIRECTORY}/diff_before_update_$(date +"%Y-%m-%d-%H-%M-%S") +mv diff_before_update* ${DIFF_DIRECTORY}/ 2> /dev/null +if ! git diff-index --quiet HEAD; then + echo -e "\e[32mSaving diff to ${DIFF_FILE}...\e[0m" + mkdir -p ${DIFF_DIRECTORY} + git diff --stat > ${DIFF_FILE} + git diff >> ${DIFF_FILE} +fi + +echo -e "\e[32mPrefetching images...\e[0m" +prefetch_images + +echo -e "\e[32mStopping mailcow...\e[0m" +sleep 2 +MAILCOW_CONTAINERS=($(docker-compose ps -q)) +docker-compose down +echo -e "\e[32mChecking for remaining containers...\e[0m" +sleep 2 +for container in "${MAILCOW_CONTAINERS[@]}"; do + docker rm -f "$container" 2> /dev/null +done + +[[ -f data/conf/nginx/ZZZ-ejabberd.conf ]] && rm data/conf/nginx/ZZZ-ejabberd.conf + +# Silently fixing remote url from andryyy to mailcow +git remote set-url origin https://github.com/mailcow/mailcow-dockerized +echo -e "\e[32mCommitting current status...\e[0m" +[[ -z "$(git config user.name)" ]] && git config user.name moo +[[ -z "$(git config user.email)" ]] && git config user.email moo@cow.moo +[[ ! -z $(git ls-files data/conf/rspamd/override.d/worker-controller-password.inc) ]] && git rm data/conf/rspamd/override.d/worker-controller-password.inc +git add -u +git commit -am "Before update on ${DATE}" > /dev/null +echo -e "\e[32mFetching updated code from remote...\e[0m" +git fetch origin #${BRANCH} +echo -e "\e[32mMerging local with remote code (recursive, strategy: \"${MERGE_STRATEGY:-theirs}\", options: \"patience\"...\e[0m" +git config merge.defaultToUpstream true +git merge -X${MERGE_STRATEGY:-theirs} -Xpatience -m "After update on ${DATE}" +# Need to use a variable to not pass return codes of if checks +MERGE_RETURN=$? +if [[ ${MERGE_RETURN} == 128 ]]; then + echo -e "\e[31m\nOh no, what happened?\n=> You most likely added files to your local mailcow instance that were now added to the official mailcow repository. Please move them to another location before updating mailcow.\e[0m" + exit 1 +elif [[ ${MERGE_RETURN} == 1 ]]; then + echo -e "\e[93mPotenial conflict, trying to fix...\e[0m" + git status --porcelain | grep -E "UD|DU" | awk '{print $2}' | xargs rm -v + git add -A + git commit -m "After update on ${DATE}" > /dev/null + git checkout . + echo -e "\e[32mRemoved and recreated files if necessary.\e[0m" +elif [[ ${MERGE_RETURN} != 0 ]]; then + echo -e "\e[31m\nOh no, something went wrong. Please check the error message above.\e[0m" + echo + echo "Run docker-compose up -d to restart your stack without updates or try again after fixing the mentioned errors." + exit 1 +fi + +if [[ ${NO_UPDATE_COMPOSE} == "y" ]]; then + echo -e "\e[33mNot fetching latest docker-compose, please check for updates manually!\e[0m" +elif [[ -e /etc/alpine-release ]]; then + echo -e "\e[33mNot fetching latest docker-compose, because you are using Alpine Linux without glibc support. Please update docker-compose via apk!\e[0m" +else + echo -e "\e[32mFetching new docker-compose version...\e[0m" + echo -e "\e[32mTrying to determine GLIBC version...\e[0m" + if ldd --version > /dev/null; then + GLIBC_V=$(ldd --version | grep -E '(GLIBC|GNU libc)' | rev | cut -d ' ' -f1 | rev | cut -d '.' -f2) + if [ ! -z "${GLIBC_V}" ] && [ ${GLIBC_V} -gt 27 ]; then + DC_DL_SUFFIX= + else + DC_DL_SUFFIX=legacy + fi + else + DC_DL_SUFFIX=legacy + fi + sleep 1 + if [[ ! -z $(which pip) && $(pip list --local 2>&1 | grep -v DEPRECATION | grep -c docker-compose) == 1 ]]; then + true + #prevent breaking a working docker-compose installed with pip + elif [[ $(curl -sL -w "%{http_code}" https://www.servercow.de/docker-compose/latest.php?vers=${DC_DL_SUFFIX} -o /dev/null) == "200" ]]; then + LATEST_COMPOSE=$(curl -#L https://www.servercow.de/docker-compose/latest.php) + COMPOSE_VERSION=$(docker-compose version --short) + if [[ "$LATEST_COMPOSE" != "$COMPOSE_VERSION" ]]; then + COMPOSE_PATH=$(which docker-compose) + if [[ -w ${COMPOSE_PATH} ]]; then + curl -#L https://github.com/docker/compose/releases/download/${LATEST_COMPOSE}/docker-compose-$(uname -s)-$(uname -m) > $COMPOSE_PATH + chmod +x $COMPOSE_PATH + else + echo -e "\e[33mWARNING: $COMPOSE_PATH is not writable, but new version $LATEST_COMPOSE is available (installed: $COMPOSE_VERSION)\e[0m" + fi + fi + else + echo -e "\e[33mCannot determine latest docker-compose version, skipping...\e[0m" + fi +fi + +echo -e "\e[32mFetching new images, if any...\e[0m" +sleep 2 +docker-compose pull + +# Fix missing SSL, does not overwrite existing files +[[ ! -d data/assets/ssl ]] && mkdir -p data/assets/ssl +cp -n -d data/assets/ssl-example/*.pem data/assets/ssl/ + +echo -e "Checking IPv6 settings... " +if grep -q 'SYSCTL_IPV6_DISABLED=1' mailcow.conf; then + echo + echo '!! IMPORTANT !!' + echo + echo 'SYSCTL_IPV6_DISABLED was removed due to complications. IPv6 can be disabled by editing "docker-compose.yml" and setting "enable_ipv6: true" to "enable_ipv6: false".' + echo 'This setting will only be active after a complete shutdown of mailcow by running "docker-compose down" followed by "docker-compose up -d".' + echo + echo '!! IMPORTANT !!' + echo + read -p "Press any key to continue..." < /dev/tty +fi + +# Checking for old project name bug +sed -i --follow-symlinks 's#COMPOSEPROJECT_NAME#COMPOSE_PROJECT_NAME#g' mailcow.conf +# Checking old, wrong bindings +sed -i --follow-symlinks 's/HTTP_BIND=0.0.0.0/HTTP_BIND=/g' mailcow.conf +sed -i --follow-symlinks 's/HTTPS_BIND=0.0.0.0/HTTPS_BIND=/g' mailcow.conf + +# Fix Rspamd maps +if [ -f data/conf/rspamd/custom/global_from_blacklist.map ]; then + mv data/conf/rspamd/custom/global_from_blacklist.map data/conf/rspamd/custom/global_smtp_from_blacklist.map +fi +if [ -f data/conf/rspamd/custom/global_from_whitelist.map ]; then + mv data/conf/rspamd/custom/global_from_whitelist.map data/conf/rspamd/custom/global_smtp_from_whitelist.map +fi + +# Fix deprecated metrics.conf +if [ -f "data/conf/rspamd/local.d/metrics.conf" ]; then + if [ ! -z "$(git diff --name-only origin/master data/conf/rspamd/local.d/metrics.conf)" ]; then + echo -e "\e[33mWARNING\e[0m - Please migrate your customizations of data/conf/rspamd/local.d/metrics.conf to actions.conf and groups.conf after this update." + echo "The deprecated configuration file metrics.conf will be moved to metrics.conf_deprecated after updating mailcow." + fi + mv data/conf/rspamd/local.d/metrics.conf data/conf/rspamd/local.d/metrics.conf_deprecated +fi + +# Set app_info.inc.php +mailcow_git_version=$(git describe --tags `git rev-list --tags --max-count=1`) +if [ $? -eq 0 ]; then + mailcow_git_url=$(git config --get remote.origin.url) + echo ' data/web/inc/app_info.inc.php + echo ' $MAILCOW_GIT_VERSION="'$mailcow_git_version'";' >> data/web/inc/app_info.inc.php + echo ' $MAILCOW_GIT_URL="'$mailcow_git_url'";' >> data/web/inc/app_info.inc.php + echo '?>' >> data/web/inc/app_info.inc.php +else + echo ' data/web/inc/app_info.inc.php + echo ' $MAILCOW_GIT_VERSION="";' >> data/web/inc/app_info.inc.php + echo ' $MAILCOW_GIT_URL="";' >> data/web/inc/app_info.inc.php + echo '?>' >> data/web/inc/app_info.inc.php + echo -e "\e[33mCannot determine current git repository version...\e[0m" +fi + +if [[ ${SKIP_START} == "y" ]]; then + echo -e "\e[33mNot starting mailcow, please run \"docker-compose up -d --remove-orphans\" to start mailcow.\e[0m" +else + echo -e "\e[32mStarting mailcow...\e[0m" + sleep 2 + docker-compose up -d --remove-orphans +fi + +echo -e "\e[32mCollecting garbage...\e[0m" +docker_garbage + +# Run post-update-hook +if [ -f "${SCRIPT_DIR}/post_update_hook.sh" ]; then + bash "${SCRIPT_DIR}/post_update_hook.sh" +fi + +#echo "In case you encounter any problem, hard-reset to a state before updating mailcow:" +#echo +#git reflog --color=always | grep "Before update on " +#echo +#echo "Use \"git reset --hard hash-on-the-left\" and run docker-compose up -d afterwards." From a1ffaae3d5cb3e530b0ac2df8ea17c6fad351756 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it <75116288+FreddleSpl0it@users.noreply.github.com> Date: Fri, 28 Jan 2022 07:27:42 +0100 Subject: [PATCH 06/36] [Web] add github version tag - adjust css --- data/web/css/build/008-mailcow.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/web/css/build/008-mailcow.css b/data/web/css/build/008-mailcow.css index d7533424..4d45a75e 100644 --- a/data/web/css/build/008-mailcow.css +++ b/data/web/css/build/008-mailcow.css @@ -204,6 +204,8 @@ legend { color: #959595; display: flex; flex-direction: column; + width: 100% !important; + padding: 0 !important; } .footer .version { margin-left: auto; From 6d6b673cf2f482c57051bc65cc929c14aa65711c Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 2 Mar 2022 18:17:10 +0100 Subject: [PATCH 07/36] [GH-Actions][stale] Update to v5.0.0 --- .github/workflows/close_old_issues_and_prs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/close_old_issues_and_prs.yml b/.github/workflows/close_old_issues_and_prs.yml index 76c93159..e746bc6f 100644 --- a/.github/workflows/close_old_issues_and_prs.yml +++ b/.github/workflows/close_old_issues_and_prs.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write steps: - name: Mark/Close Stale Issues and Pull Requests đŸ—‘ïž - uses: actions/stale@v4 + uses: actions/stale@v5.0.0 with: repo-token: ${{ secrets.STALE_ACTION_PAT }} days-before-stale: 60 From 412e1188b04cd72d79a836cfc303bd4f7d363f45 Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 2 Mar 2022 18:21:08 +0100 Subject: [PATCH 08/36] Fix issue forms --- .github/ISSUE_TEMPLATE/{Bug_report.md => Bug_report.yml} | 0 .../ISSUE_TEMPLATE/{Feature_request.md => Feature_request.yml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/ISSUE_TEMPLATE/{Bug_report.md => Bug_report.yml} (100%) rename .github/ISSUE_TEMPLATE/{Feature_request.md => Feature_request.yml} (100%) diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/Bug_report.md rename to .github/ISSUE_TEMPLATE/Bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/Feature_request.md rename to .github/ISSUE_TEMPLATE/Feature_request.yml From 4907f702c8e2018869bb3553ede13d873cb8e493 Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 2 Mar 2022 18:22:27 +0100 Subject: [PATCH 09/36] Fix issue forms --- .github/ISSUE_TEMPLATE/{Bug_report.md => Bug_report.yml} | 0 .../ISSUE_TEMPLATE/{Feature_request.md => Feature_request.yml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/ISSUE_TEMPLATE/{Bug_report.md => Bug_report.yml} (100%) rename .github/ISSUE_TEMPLATE/{Feature_request.md => Feature_request.yml} (100%) diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/Bug_report.md rename to .github/ISSUE_TEMPLATE/Bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/Feature_request.md rename to .github/ISSUE_TEMPLATE/Feature_request.yml From 5541f84c3c392f79f4d981deaffa4cac0ac5aed2 Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 2 Mar 2022 18:22:55 +0100 Subject: [PATCH 10/36] [GH-Actions][stale] Update to v5.0.0 --- .github/workflows/close_old_issues_and_prs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/close_old_issues_and_prs.yml b/.github/workflows/close_old_issues_and_prs.yml index 76c93159..e746bc6f 100644 --- a/.github/workflows/close_old_issues_and_prs.yml +++ b/.github/workflows/close_old_issues_and_prs.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write steps: - name: Mark/Close Stale Issues and Pull Requests đŸ—‘ïž - uses: actions/stale@v4 + uses: actions/stale@v5.0.0 with: repo-token: ${{ secrets.STALE_ACTION_PAT }} days-before-stale: 60 From 24275ffdbf6facaf38ae77a3094363b8e0a01f33 Mon Sep 17 00:00:00 2001 From: andryyy Date: Wed, 2 Mar 2022 17:05:01 +0100 Subject: [PATCH 11/36] Before update on 2022-03-02_17_04_05 --- data/conf/postfix/main.cf | 3 +++ docker-compose.yml | 30 ------------------------------ 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/data/conf/postfix/main.cf b/data/conf/postfix/main.cf index a445b60c..62c91191 100644 --- a/data/conf/postfix/main.cf +++ b/data/conf/postfix/main.cf @@ -198,3 +198,6 @@ parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks # DO NOT EDIT ANYTHING BELOW # # User overrides # + +myhostname = mx.mailcow.email + diff --git a/docker-compose.yml b/docker-compose.yml index 74b01aca..a4ae8454 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -577,36 +577,6 @@ services: aliases: - ofelia - ipv6nat-mailcow: - depends_on: - - unbound-mailcow - - mysql-mailcow - - redis-mailcow - - clamd-mailcow - - rspamd-mailcow - - php-fpm-mailcow - - sogo-mailcow - - dovecot-mailcow - - postfix-mailcow - - memcached-mailcow - - nginx-mailcow - - acme-mailcow - - netfilter-mailcow - - watchdog-mailcow - - dockerapi-mailcow - - solr-mailcow - environment: - - TZ=${TZ} - image: robbertkl/ipv6nat - security_opt: - - label=disable - restart: always - privileged: true - network_mode: "host" - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - - /lib/modules:/lib/modules:ro - networks: mailcow-network: driver: bridge From 98bc947d003c70751b34ac29d2163060e9093e23 Mon Sep 17 00:00:00 2001 From: andryyy Date: Wed, 2 Mar 2022 20:08:24 +0100 Subject: [PATCH 12/36] [Web] Update composer libs - Removing symfony/deprecation-contracts (v2.4.0) - Upgrading ddeboer/imap (1.12.1 => 1.13.1) - Upgrading directorytree/ldaprecord (v2.6.3 => v2.10.1) - Upgrading illuminate/contracts (v8.53.1 => v9.3.0) - Upgrading nesbot/carbon (2.51.1 => 2.57.0) - Upgrading phpmailer/phpmailer (v6.5.0 => v6.6.0) - Upgrading psr/container (1.1.1 => 2.0.2) - Upgrading psr/log (1.1.4 => 3.0.0) - Upgrading psr/simple-cache (1.0.1 => 2.0.0) - Upgrading robthree/twofactorauth (1.8.0 => 1.8.1) - Upgrading symfony/polyfill-ctype (v1.23.0 => v1.24.0) - Upgrading symfony/polyfill-mbstring (v1.23.1 => v1.24.0) - Upgrading symfony/polyfill-php80 (v1.23.1 => v1.24.0) - Upgrading symfony/translation (v5.3.4 => v6.0.5) - Upgrading symfony/translation-contracts (v2.4.0 => v3.0.0) - Upgrading symfony/var-dumper (v5.3.6 => v6.0.5) - Upgrading tightenco/collect (v8.34.0 => v8.83.2) - Upgrading twig/twig (v3.3.2 => v3.3.8) --- data/conf/rspamd/lua/ivm-sg.lua | 61 - data/web/inc/lib/composer.lock | 432 +++-- data/web/inc/lib/vendor/bin/carbon | 98 +- data/web/inc/lib/vendor/bin/minifycss | 98 +- data/web/inc/lib/vendor/bin/minifyjs | 98 +- data/web/inc/lib/vendor/bin/var-dump-server | 98 +- .../inc/lib/vendor/composer/ClassLoader.php | 113 +- .../lib/vendor/composer/InstalledVersions.php | 25 +- .../lib/vendor/composer/autoload_files.php | 5 +- .../inc/lib/vendor/composer/autoload_psr4.php | 2 +- .../inc/lib/vendor/composer/autoload_real.php | 9 +- .../lib/vendor/composer/autoload_static.php | 7 +- .../inc/lib/vendor/composer/installed.json | 450 +++-- .../web/inc/lib/vendor/composer/installed.php | 125 +- .../lib/vendor/composer/platform_check.php | 4 +- .../lib/vendor/ddeboer/imap/.php-cs-fixer.php | 73 + .../inc/lib/vendor/ddeboer/imap/composer.json | 22 +- .../vendor/ddeboer/imap/src/Connection.php | 1 + .../vendor/ddeboer/imap/src/ImapResource.php | 14 +- .../lib/vendor/ddeboer/imap/src/Mailbox.php | 1 + .../ddeboer/imap/src/Message/AbstractPart.php | 7 + .../ddeboer/imap/src/Message/EmailAddress.php | 1 + .../imap/src/MessageIteratorInterface.php | 2 +- .../.github/workflows/run-tests.yml | 39 +- .../directorytree/ldaprecord/.gitignore | 1 + .../directorytree/ldaprecord/.styleci.yml | 4 + .../directorytree/ldaprecord/composer.json | 12 +- .../vendor/directorytree/ldaprecord/readme.md | 10 + .../ldaprecord/src/Auth/Guard.php | 4 +- .../src/Configuration/DomainConfiguration.php | 8 +- .../Configuration/Validators/Validator.php | 8 +- .../ldaprecord/src/Connection.php | 28 +- .../ldaprecord/src/ConnectionManager.php | 4 +- .../ldaprecord/src/Events/Logger.php | 9 +- .../ldaprecord/src/Events/NullDispatcher.php | 113 ++ .../ldaprecord/src/HandlesConnection.php | 10 +- .../directorytree/ldaprecord/src/Ldap.php | 17 +- .../ldaprecord/src/LdapInterface.php | 56 +- .../src/Models/ActiveDirectory/Entry.php | 17 +- .../src/Models/ActiveDirectory/Group.php | 2 +- .../Scopes/InConfigurationContext.php | 8 +- .../src/Models/ActiveDirectory/User.php | 39 + .../src/Models/Attributes/AccountControl.php | 8 +- .../Models/Attributes/DistinguishedName.php | 38 +- .../Attributes/DistinguishedNameBuilder.php | 2 +- .../src/Models/Attributes/EscapedValue.php | 12 +- .../src/Models/Attributes/Password.php | 12 +- .../src/Models/Attributes/Timestamp.php | 16 +- .../src/Models/Concerns/CanAuthenticate.php | 3 + .../src/Models/Concerns/HasAttributes.php | 46 +- .../src/Models/Concerns/HasEvents.php | 29 + .../src/Models/Concerns/HasGlobalScopes.php | 4 +- .../src/Models/Concerns/HasPassword.php | 8 +- .../ldaprecord/src/Models/Model.php | 214 ++- .../src/Models/Relations/HasMany.php | 8 +- .../src/Models/Relations/HasOne.php | 8 +- .../src/Models/Relations/OneToMany.php | 2 +- .../ldaprecord/src/Query/Builder.php | 206 ++- .../ldaprecord/src/Query/Collection.php | 1 + .../src/Query/Events/QueryExecuted.php | 4 +- .../ldaprecord/src/Query/Grammar.php | 8 +- .../Query/Model/ActiveDirectoryBuilder.php | 4 +- .../ldaprecord/src/Query/Model/Builder.php | 10 +- .../Query/MultipleObjectsFoundException.php | 9 + .../src/Query/ObjectNotFoundException.php | 4 +- .../src/Query/ObjectsNotFoundException.php | 9 + .../Query/Pagination/AbstractPaginator.php | 16 +- .../src/Query/Pagination/LazyPaginator.php | 4 +- .../src/Query/Pagination/Paginator.php | 23 +- .../ldaprecord/src/Testing/DirectoryFake.php | 4 +- .../ldaprecord/src/Testing/LdapFake.php | 24 +- .../ldaprecord/src/Utilities.php | 6 +- .../illuminate/contracts/Auth/Guard.php | 7 + .../contracts/Auth/PasswordBrokerFactory.php | 2 +- .../contracts/Broadcasting/Broadcaster.php | 2 + .../Broadcasting/ShouldBroadcast.php | 2 +- .../contracts/Container/Container.php | 27 + .../Container/ContextualBindingBuilder.php | 11 +- .../contracts/Database/Eloquent/Builder.php | 14 + .../contracts/Database/Query/Builder.php | 12 + .../contracts/Debug/ExceptionHandler.php | 2 + .../contracts/Encryption/Encrypter.php | 7 + .../Filesystem/FileExistsException.php | 10 - .../contracts/Filesystem/Filesystem.php | 9 +- .../contracts/Foundation/Application.php | 24 +- .../Foundation/ExceptionRenderer.php | 14 + .../contracts/Foundation/MaintenanceMode.php | 35 + .../illuminate/contracts/Mail/Mailable.php | 2 +- .../illuminate/contracts/Mail/Mailer.php | 7 - .../vendor/illuminate/contracts/Queue/Job.php | 4 +- .../illuminate/contracts/Queue/Queue.php | 4 +- .../contracts/Queue/QueueableCollection.php | 4 +- .../contracts/Routing/ResponseFactory.php | 2 +- .../contracts/Routing/UrlGenerator.php | 7 + .../contracts/Support/Arrayable.php | 6 +- .../Support/CanBeEscapedWhenCastToString.php | 14 + .../contracts/Support/ValidatedData.php | 11 + .../vendor/illuminate/contracts/composer.json | 8 +- .../inc/lib/vendor/nesbot/carbon/bin/carbon | 4 +- .../lib/vendor/nesbot/carbon/composer.json | 15 +- .../lazy/Carbon/PHPStan/MacroStrongType.php | 43 + .../lazy/Carbon/PHPStan/MacroWeakType.php | 49 + .../lazy/Carbon/TranslatorStrongType.php | 52 + .../carbon/lazy/Carbon/TranslatorWeakType.php | 32 + .../inc/lib/vendor/nesbot/carbon/readme.md | 2 - .../carbon/src/Carbon/AbstractTranslator.php | 401 +++++ .../nesbot/carbon/src/Carbon/Carbon.php | 8 +- .../src/Carbon/CarbonConverterInterface.php | 1 + .../carbon/src/Carbon/CarbonImmutable.php | 8 +- .../carbon/src/Carbon/CarbonInterface.php | 75 +- .../carbon/src/Carbon/CarbonInterval.php | 140 +- .../nesbot/carbon/src/Carbon/CarbonPeriod.php | 112 +- .../carbon/src/Carbon/CarbonTimeZone.php | 4 +- .../nesbot/carbon/src/Carbon/Cli/Invoker.php | 9 + .../Carbon/Doctrine/CarbonDoctrineType.php | 9 +- .../Carbon/Doctrine/CarbonImmutableType.php | 13 +- .../carbon/src/Carbon/Doctrine/CarbonType.php | 13 +- .../Carbon/Doctrine/CarbonTypeConverter.php | 25 +- .../Doctrine/DateTimeDefaultPrecision.php | 9 +- .../Exceptions/BadComparisonUnitException.php | 1 + .../BadFluentConstructorException.php | 1 + .../Exceptions/BadFluentSetterException.php | 1 + .../Exceptions/BadMethodCallException.php | 1 + .../src/Carbon/Exceptions/Exception.php | 1 + .../Carbon/Exceptions/ImmutableException.php | 1 + .../Exceptions/InvalidArgumentException.php | 1 + .../Exceptions/InvalidCastException.php | 1 + .../Exceptions/InvalidDateException.php | 1 + .../Exceptions/InvalidFormatException.php | 1 + .../Exceptions/InvalidIntervalException.php | 1 + .../Exceptions/InvalidPeriodDateException.php | 1 + .../InvalidPeriodParameterException.php | 1 + .../Exceptions/InvalidTimeZoneException.php | 1 + .../Exceptions/InvalidTypeException.php | 1 + .../Exceptions/NotACarbonClassException.php | 1 + .../Carbon/Exceptions/NotAPeriodException.php | 1 + .../Exceptions/NotLocaleAwareException.php | 1 + .../Carbon/Exceptions/OutOfRangeException.php | 1 + .../Carbon/Exceptions/ParseErrorException.php | 1 + .../Carbon/Exceptions/RuntimeException.php | 1 + .../src/Carbon/Exceptions/UnitException.php | 1 + .../Exceptions/UnitNotConfiguredException.php | 1 + .../Exceptions/UnknownGetterException.php | 1 + .../Exceptions/UnknownMethodException.php | 1 + .../Exceptions/UnknownSetterException.php | 1 + .../Exceptions/UnknownUnitException.php | 1 + .../Exceptions/UnreachableException.php | 1 + .../nesbot/carbon/src/Carbon/Factory.php | 428 ++--- .../carbon/src/Carbon/FactoryImmutable.php | 419 ++--- .../nesbot/carbon/src/Carbon/Lang/af_NA.php | 1 + .../nesbot/carbon/src/Carbon/Lang/af_ZA.php | 1 + .../nesbot/carbon/src/Carbon/Lang/agq.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ar_DJ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ar_EH.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ar_ER.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ar_IL.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ar_KM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ar_MR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ar_PS.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ar_SO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ar_TD.php | 1 + .../nesbot/carbon/src/Carbon/Lang/asa.php | 1 + .../nesbot/carbon/src/Carbon/Lang/az_Cyrl.php | 1 + .../nesbot/carbon/src/Carbon/Lang/az_Latn.php | 1 + .../nesbot/carbon/src/Carbon/Lang/bas.php | 1 + .../nesbot/carbon/src/Carbon/Lang/be.php | 9 +- .../nesbot/carbon/src/Carbon/Lang/bez.php | 1 + .../nesbot/carbon/src/Carbon/Lang/bg.php | 5 +- .../nesbot/carbon/src/Carbon/Lang/bg_BG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/bo_CN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/bo_IN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/br_FR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/bs.php | 7 +- .../nesbot/carbon/src/Carbon/Lang/bs_BA.php | 1 + .../nesbot/carbon/src/Carbon/Lang/bs_Cyrl.php | 1 + .../nesbot/carbon/src/Carbon/Lang/bs_Latn.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ca.php | 13 +- .../nesbot/carbon/src/Carbon/Lang/ca_AD.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ca_ES.php | 1 + .../carbon/src/Carbon/Lang/ca_ES_Valencia.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ca_FR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ca_IT.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ccp.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ccp_IN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/cgg.php | 1 + .../nesbot/carbon/src/Carbon/Lang/cs_CZ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/cu.php | 1 + .../nesbot/carbon/src/Carbon/Lang/cv.php | 2 +- .../nesbot/carbon/src/Carbon/Lang/cv_RU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/cy_GB.php | 1 + .../nesbot/carbon/src/Carbon/Lang/da_DK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/da_GL.php | 1 + .../nesbot/carbon/src/Carbon/Lang/dav.php | 1 + .../nesbot/carbon/src/Carbon/Lang/de_LI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/dje.php | 1 + .../nesbot/carbon/src/Carbon/Lang/dua.php | 1 + .../nesbot/carbon/src/Carbon/Lang/dv.php | 1 + .../nesbot/carbon/src/Carbon/Lang/dv_MV.php | 2 +- .../nesbot/carbon/src/Carbon/Lang/dyo.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ebu.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ee.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ee_TG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/el.php | 5 +- .../nesbot/carbon/src/Carbon/Lang/en_001.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_150.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_AI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_AS.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_AT.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_BB.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_BE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_BI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_BM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_BS.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_BW.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_BZ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_CC.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_CH.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_CK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_CM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_CX.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_DE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_DG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_DM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_ER.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_FI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_FJ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_FK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_FM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_GD.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_GG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_GH.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_GI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_GM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_GU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_GY.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_IM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_IO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_ISO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_JE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_JM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_KE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_KI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_KN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_KY.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_LC.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_LR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_LS.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_MG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_MH.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_MO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_MP.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_MS.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_MT.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_MU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_MW.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_MY.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_NA.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_NF.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_NG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_NL.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_NR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_NU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_PG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_PK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_PN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_PR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_PW.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_RW.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_SB.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_SC.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_SD.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_SE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_SG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_SH.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_SI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_SL.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_SS.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_SX.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_SZ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_TC.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_TK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_TO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_TT.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_TV.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_TZ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_UG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_UM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_US.php | 1 + .../carbon/src/Carbon/Lang/en_US_Posix.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_VC.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_VG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_VI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_VU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_WS.php | 1 + .../nesbot/carbon/src/Carbon/Lang/en_ZW.php | 1 + .../nesbot/carbon/src/Carbon/Lang/es.php | 13 +- .../nesbot/carbon/src/Carbon/Lang/es_BR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/es_BZ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/es_CU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/es_EA.php | 1 + .../nesbot/carbon/src/Carbon/Lang/es_GQ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/es_IC.php | 1 + .../nesbot/carbon/src/Carbon/Lang/es_PH.php | 1 + .../nesbot/carbon/src/Carbon/Lang/et_EE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/eu_ES.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ewo.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fa_AF.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fa_IR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ff_CM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ff_GN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ff_MR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fi_FI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fo_DK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fo_FO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_BF.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_BI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_BJ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_BL.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_CD.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_CF.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_CG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_CI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_CM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_DJ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_DZ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_FR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_GA.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_GF.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_GN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_GP.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_GQ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_HT.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_KM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_MA.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_MC.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_MF.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_MG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_ML.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_MQ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_MR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_MU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_NC.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_NE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_PF.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_PM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_RE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_RW.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_SC.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_SN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_SY.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_TD.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_TG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_TN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_VU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_WF.php | 1 + .../nesbot/carbon/src/Carbon/Lang/fr_YT.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ga_IE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/gd_GB.php | 1 + .../nesbot/carbon/src/Carbon/Lang/gl.php | 13 +- .../nesbot/carbon/src/Carbon/Lang/gl_ES.php | 1 + .../carbon/src/Carbon/Lang/gom_Latn.php | 1 + .../nesbot/carbon/src/Carbon/Lang/gsw_CH.php | 1 + .../nesbot/carbon/src/Carbon/Lang/gsw_FR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/gsw_LI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/gu.php | 2 +- .../nesbot/carbon/src/Carbon/Lang/gu_IN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/guz.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ha_GH.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ha_NE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ha_NG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/haw.php | 1 + .../nesbot/carbon/src/Carbon/Lang/he_IL.php | 1 + .../nesbot/carbon/src/Carbon/Lang/hi_IN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/hr.php | 7 +- .../nesbot/carbon/src/Carbon/Lang/hr_HR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/hu.php | 7 +- .../nesbot/carbon/src/Carbon/Lang/hu_HU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/i18n.php | 1 + .../nesbot/carbon/src/Carbon/Lang/id_ID.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ii.php | 1 + .../nesbot/carbon/src/Carbon/Lang/in.php | 1 + .../nesbot/carbon/src/Carbon/Lang/is_IS.php | 1 + .../nesbot/carbon/src/Carbon/Lang/it.php | 5 +- .../nesbot/carbon/src/Carbon/Lang/it_SM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/it_VA.php | 1 + .../nesbot/carbon/src/Carbon/Lang/iw.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ja.php | 7 +- .../nesbot/carbon/src/Carbon/Lang/ja_JP.php | 1 + .../nesbot/carbon/src/Carbon/Lang/jgo.php | 1 + .../nesbot/carbon/src/Carbon/Lang/jmc.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ka.php | 5 +- .../nesbot/carbon/src/Carbon/Lang/ka_GE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/kam.php | 1 + .../nesbot/carbon/src/Carbon/Lang/kde.php | 1 + .../nesbot/carbon/src/Carbon/Lang/kea.php | 1 + .../nesbot/carbon/src/Carbon/Lang/khq.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ki.php | 1 + .../nesbot/carbon/src/Carbon/Lang/kk_KZ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/kkj.php | 1 + .../nesbot/carbon/src/Carbon/Lang/kln.php | 1 + .../nesbot/carbon/src/Carbon/Lang/km_KH.php | 1 + .../nesbot/carbon/src/Carbon/Lang/kn_IN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ko_KP.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ko_KR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ksb.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ksf.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ksh.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ku_TR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ky_KG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/lag.php | 1 + .../nesbot/carbon/src/Carbon/Lang/lb.php | 5 +- .../nesbot/carbon/src/Carbon/Lang/lb_LU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/lkt.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ln_AO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ln_CF.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ln_CG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/lo_LA.php | 1 + .../nesbot/carbon/src/Carbon/Lang/lrc.php | 1 + .../nesbot/carbon/src/Carbon/Lang/lrc_IQ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/lt_LT.php | 1 + .../nesbot/carbon/src/Carbon/Lang/lu.php | 1 + .../nesbot/carbon/src/Carbon/Lang/luo.php | 1 + .../nesbot/carbon/src/Carbon/Lang/luy.php | 1 + .../nesbot/carbon/src/Carbon/Lang/lv.php | 11 +- .../nesbot/carbon/src/Carbon/Lang/lv_LV.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mas.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mas_TZ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mer.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mgh.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mgo.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mi_NZ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/miq_NI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mk.php | 5 +- .../nesbot/carbon/src/Carbon/Lang/mk_MK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ml_IN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mn.php | 3 - .../nesbot/carbon/src/Carbon/Lang/mn_MN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mo.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mr_IN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ms.php | 8 +- .../nesbot/carbon/src/Carbon/Lang/ms_BN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ms_SG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mt_MT.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mua.php | 1 + .../nesbot/carbon/src/Carbon/Lang/my_MM.php | 1 + .../nesbot/carbon/src/Carbon/Lang/mzn.php | 1 + .../nesbot/carbon/src/Carbon/Lang/naq.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nb_NO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nb_SJ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nd.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nds_DE.php | 47 +- .../nesbot/carbon/src/Carbon/Lang/ne_IN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ne_NP.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nl.php | 4 +- .../nesbot/carbon/src/Carbon/Lang/nl_BQ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nl_CW.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nl_SR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nl_SX.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nmg.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nn_NO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nnh.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nus.php | 1 + .../nesbot/carbon/src/Carbon/Lang/nyn.php | 1 + .../nesbot/carbon/src/Carbon/Lang/oc.php | 4 +- .../nesbot/carbon/src/Carbon/Lang/oc_FR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/om_ET.php | 1 + .../nesbot/carbon/src/Carbon/Lang/om_KE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pa_Arab.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pa_Guru.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pl.php | 18 +- .../nesbot/carbon/src/Carbon/Lang/pl_PL.php | 1 + .../nesbot/carbon/src/Carbon/Lang/prg.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ps_AF.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pt.php | 5 +- .../nesbot/carbon/src/Carbon/Lang/pt_AO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pt_CH.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pt_CV.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pt_GQ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pt_GW.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pt_LU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pt_MO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pt_MZ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pt_ST.php | 1 + .../nesbot/carbon/src/Carbon/Lang/pt_TL.php | 1 + .../nesbot/carbon/src/Carbon/Lang/qu.php | 1 + .../nesbot/carbon/src/Carbon/Lang/qu_BO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/qu_EC.php | 1 + .../nesbot/carbon/src/Carbon/Lang/rn.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ro_MD.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ro_RO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/rof.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ru.php | 7 +- .../nesbot/carbon/src/Carbon/Lang/ru_BY.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ru_KG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ru_KZ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ru_MD.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ru_RU.php | 1 + .../nesbot/carbon/src/Carbon/Lang/rwk.php | 1 + .../nesbot/carbon/src/Carbon/Lang/saq.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sbp.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sd.php | 1 + .../nesbot/carbon/src/Carbon/Lang/se_FI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/se_NO.php | 1 + .../nesbot/carbon/src/Carbon/Lang/se_SE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/seh.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ses.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sg.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sh.php | 5 +- .../nesbot/carbon/src/Carbon/Lang/shi.php | 1 + .../carbon/src/Carbon/Lang/shi_Latn.php | 1 + .../carbon/src/Carbon/Lang/shi_Tfng.php | 1 + .../nesbot/carbon/src/Carbon/Lang/si.php | 4 +- .../nesbot/carbon/src/Carbon/Lang/si_LK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sk_SK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sl.php | 5 +- .../nesbot/carbon/src/Carbon/Lang/sl_SI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/smn.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sn.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sq_AL.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sq_MK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sq_XK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sr.php | 7 +- .../nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php | 7 +- .../carbon/src/Carbon/Lang/sr_Cyrl_BA.php | 1 + .../carbon/src/Carbon/Lang/sr_Cyrl_ME.php | 7 +- .../carbon/src/Carbon/Lang/sr_Cyrl_XK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sr_Latn.php | 1 + .../carbon/src/Carbon/Lang/sr_Latn_BA.php | 1 + .../carbon/src/Carbon/Lang/sr_Latn_ME.php | 7 +- .../carbon/src/Carbon/Lang/sr_Latn_XK.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sr_ME.php | 1 + .../carbon/src/Carbon/Lang/sr_RS@latin.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ss_ZA.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sv_AX.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sv_FI.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sv_SE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sw_CD.php | 1 + .../nesbot/carbon/src/Carbon/Lang/sw_UG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/szl_PL.php | 18 +- .../nesbot/carbon/src/Carbon/Lang/ta_MY.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ta_SG.php | 1 + .../nesbot/carbon/src/Carbon/Lang/te_IN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/teo.php | 1 + .../nesbot/carbon/src/Carbon/Lang/teo_KE.php | 1 + .../nesbot/carbon/src/Carbon/Lang/tg_TJ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/th_TH.php | 1 + .../nesbot/carbon/src/Carbon/Lang/tr_CY.php | 1 + .../nesbot/carbon/src/Carbon/Lang/tr_TR.php | 1 + .../nesbot/carbon/src/Carbon/Lang/twq.php | 1 + .../nesbot/carbon/src/Carbon/Lang/uk.php | 21 +- .../nesbot/carbon/src/Carbon/Lang/uk_UA.php | 1 + .../nesbot/carbon/src/Carbon/Lang/ur.php | 1 + .../nesbot/carbon/src/Carbon/Lang/uz_Arab.php | 1 + .../nesbot/carbon/src/Carbon/Lang/uz_Cyrl.php | 1 + .../nesbot/carbon/src/Carbon/Lang/vai.php | 1 + .../carbon/src/Carbon/Lang/vai_Latn.php | 1 + .../carbon/src/Carbon/Lang/vai_Vaii.php | 1 + .../nesbot/carbon/src/Carbon/Lang/vi_VN.php | 1 + .../nesbot/carbon/src/Carbon/Lang/vo.php | 1 + .../nesbot/carbon/src/Carbon/Lang/vun.php | 1 + .../nesbot/carbon/src/Carbon/Lang/xog.php | 1 + .../nesbot/carbon/src/Carbon/Lang/yav.php | 1 + .../nesbot/carbon/src/Carbon/Lang/yo_BJ.php | 1 + .../nesbot/carbon/src/Carbon/Lang/yo_NG.php | 1 + .../carbon/src/Carbon/Lang/yue_Hans.php | 1 + .../carbon/src/Carbon/Lang/yue_Hant.php | 1 + .../carbon/src/Carbon/Lang/zh_Hans_HK.php | 1 + .../carbon/src/Carbon/Lang/zh_Hans_MO.php | 1 + .../carbon/src/Carbon/Lang/zh_Hans_SG.php | 1 + .../carbon/src/Carbon/Lang/zh_Hant_HK.php | 1 + .../carbon/src/Carbon/Lang/zh_Hant_MO.php | 1 + .../carbon/src/Carbon/Lang/zh_Hant_TW.php | 1 + .../nesbot/carbon/src/Carbon/Language.php | 1 + .../src/Carbon/Laravel/ServiceProvider.php | 9 + .../src/Carbon/PHPStan/AbstractMacro.php | 222 +++ .../carbon/src/Carbon/PHPStan/Macro.php | 238 +-- .../src/Carbon/PHPStan/MacroExtension.php | 9 + .../src/Carbon/PHPStan/MacroScanner.php | 9 + .../carbon/src/Carbon/Traits/Boundaries.php | 1 + .../nesbot/carbon/src/Carbon/Traits/Cast.php | 9 + .../carbon/src/Carbon/Traits/Comparison.php | 7 +- .../carbon/src/Carbon/Traits/Converter.php | 1 + .../carbon/src/Carbon/Traits/Creator.php | 21 +- .../nesbot/carbon/src/Carbon/Traits/Date.php | 46 +- .../Carbon/Traits/DeprecatedProperties.php | 61 + .../carbon/src/Carbon/Traits/Difference.php | 42 +- .../src/Carbon/Traits/IntervalRounding.php | 1 + .../carbon/src/Carbon/Traits/IntervalStep.php | 1 + .../carbon/src/Carbon/Traits/Localization.php | 32 +- .../nesbot/carbon/src/Carbon/Traits/Macro.php | 1 + .../nesbot/carbon/src/Carbon/Traits/Mixin.php | 7 +- .../carbon/src/Carbon/Traits/Modifiers.php | 3 + .../carbon/src/Carbon/Traits/Mutability.php | 1 + .../Carbon/Traits/ObjectInitialisation.php | 1 + .../carbon/src/Carbon/Traits/Options.php | 5 + .../carbon/src/Carbon/Traits/Rounding.php | 1 + .../src/Carbon/Traits/Serialization.php | 3 + .../nesbot/carbon/src/Carbon/Traits/Test.php | 123 +- .../carbon/src/Carbon/Traits/Timestamp.php | 1 + .../nesbot/carbon/src/Carbon/Traits/Units.php | 25 +- .../nesbot/carbon/src/Carbon/Traits/Week.php | 1 + .../nesbot/carbon/src/Carbon/Translator.php | 403 +---- .../carbon/src/Carbon/TranslatorImmutable.php | 99 ++ .../Carbon/TranslatorStrongTypeInterface.php | 22 + .../lib/vendor/phpmailer/phpmailer/README.md | 17 +- .../lib/vendor/phpmailer/phpmailer/VERSION | 2 +- .../vendor/phpmailer/phpmailer/composer.json | 17 +- .../phpmailer/language/phpmailer.lang-fr.php | 28 +- .../phpmailer/language/phpmailer.lang-ja.php | 15 +- .../phpmailer/language/phpmailer.lang-nl.php | 7 +- .../language/phpmailer.lang-pt_br.php | 10 +- .../phpmailer/language/phpmailer.lang-ro.php | 10 +- .../phpmailer/language/phpmailer.lang-sl.php | 7 +- .../phpmailer/phpmailer/phpunit.xml.dist | 35 - .../phpmailer/phpmailer/src/Exception.php | 2 +- .../vendor/phpmailer/phpmailer/src/OAuth.php | 2 +- .../phpmailer/src/OAuthTokenProvider.php | 44 + .../phpmailer/phpmailer/src/PHPMailer.php | 209 ++- .../vendor/phpmailer/phpmailer/src/POP3.php | 16 +- .../vendor/phpmailer/phpmailer/src/SMTP.php | 14 +- .../lib/vendor/psr/container/composer.json | 7 +- .../src/ContainerExceptionInterface.php | 4 +- .../psr/container/src/ContainerInterface.php | 2 +- .../vendor/psr/log/Psr/Log/AbstractLogger.php | 128 -- .../vendor/psr/log/Psr/Log/Test/DummyTest.php | 18 - .../log/Psr/Log/Test/LoggerInterfaceTest.php | 138 -- .../psr/log/Psr/Log/Test/TestLogger.php | 147 -- data/web/inc/lib/vendor/psr/log/composer.json | 6 +- .../lib/vendor/psr/log/src/AbstractLogger.php | 15 + .../Log => src}/InvalidArgumentException.php | 0 .../psr/log/{Psr/Log => src}/LogLevel.php | 0 .../{Psr/Log => src}/LoggerAwareInterface.php | 2 +- .../log/{Psr/Log => src}/LoggerAwareTrait.php | 4 +- .../log/{Psr/Log => src}/LoggerInterface.php | 36 +- .../psr/log/{Psr/Log => src}/LoggerTrait.php | 36 +- .../psr/log/{Psr/Log => src}/NullLogger.php | 6 +- .../lib/vendor/psr/simple-cache/composer.json | 6 +- .../psr/simple-cache/src/CacheException.php | 2 +- .../psr/simple-cache/src/CacheInterface.php | 22 +- .../vendor/robthree/twofactorauth/README.md | 174 +- .../robthree/twofactorauth/composer.json | 2 +- .../robthree/twofactorauth/demo/demo.php | 54 +- .../robthree/twofactorauth/demo/loader.php | 50 - .../robthree/twofactorauth/docs/_config.yml | 3 + .../twofactorauth/docs/_layouts/post.html | 9 + .../twofactorauth/docs/assets/css/style.scss | 54 + .../twofactorauth/docs/getting-started.md | 58 + .../docs/improved-code-verification.md | 32 + .../robthree/twofactorauth/docs/index.md | 18 + .../docs/optional-configuration.md | 56 + .../robthree/twofactorauth/docs/qr-codes.md | 61 + .../twofactorauth/docs/qr-codes/bacon.md | 23 + .../twofactorauth/docs/qr-codes/endroid.md | 37 + .../docs/qr-codes/image-charts.md | 16 + .../twofactorauth/docs/qr-codes/qr-server.md | 20 + .../twofactorauth/docs/qr-codes/qrickit.md | 15 + .../Qr/GoogleChartsQrCodeProvider.php | 67 + .../twofactorauth/tests/TwoFactorAuthTest.php | 2 +- .../symfony/deprecation-contracts/.gitignore | 3 - .../deprecation-contracts/CHANGELOG.md | 5 - .../symfony/deprecation-contracts/LICENSE | 19 - .../symfony/deprecation-contracts/README.md | 26 - .../deprecation-contracts/composer.json | 35 - .../deprecation-contracts/function.php | 27 - .../vendor/symfony/polyfill-ctype/Ctype.php | 53 +- .../symfony/polyfill-ctype/composer.json | 3 + .../symfony/polyfill-mbstring/Mbstring.php | 5 +- .../symfony/polyfill-mbstring/composer.json | 3 + .../Resources/stubs/UnhandledMatchError.php | 6 +- .../Resources/stubs/ValueError.php | 6 +- .../LocaleAwareInterface.php | 6 +- .../Test/TranslatorTest.php | 45 +- .../TranslatorInterface.php | 11 +- .../translation-contracts/TranslatorTrait.php | 9 +- .../translation-contracts/composer.json | 4 +- .../vendor/symfony/translation/CHANGELOG.md | 7 + .../Catalogue/AbstractOperation.php | 23 +- .../Catalogue/OperationInterface.php | 20 +- .../translation/Catalogue/TargetOperation.php | 2 +- .../Command/TranslationPullCommand.php | 48 +- .../Command/TranslationPushCommand.php | 39 +- .../translation/Command/TranslationTrait.php | 3 +- .../translation/Command/XliffLintCommand.php | 51 +- .../TranslationDataCollector.php | 22 +- .../translation/DataCollectorTranslator.php | 25 +- .../TranslationDumperPass.php | 19 +- .../TranslationExtractorPass.php | 19 +- .../DependencyInjection/TranslatorPass.php | 37 +- .../TranslatorPathsPass.php | 54 +- .../translation/Dumper/CsvFileDumper.php | 8 +- .../symfony/translation/Dumper/FileDumper.php | 8 +- .../translation/Dumper/IcuResFileDumper.php | 4 +- .../translation/Dumper/IniFileDumper.php | 4 +- .../translation/Dumper/JsonFileDumper.php | 4 +- .../translation/Dumper/MoFileDumper.php | 6 +- .../translation/Dumper/PhpFileDumper.php | 4 +- .../translation/Dumper/PoFileDumper.php | 6 +- .../translation/Dumper/QtFileDumper.php | 4 +- .../translation/Dumper/XliffFileDumper.php | 4 +- .../translation/Dumper/YamlFileDumper.php | 6 +- .../Exception/ProviderException.php | 6 +- .../Exception/ProviderExceptionInterface.php | 2 - .../Extractor/AbstractFileExtractor.php | 17 +- .../translation/Extractor/ChainExtractor.php | 4 +- .../Extractor/ExtractorInterface.php | 2 +- .../translation/Extractor/PhpExtractor.php | 24 +- .../Extractor/PhpStringTokenParser.php | 12 +- .../Formatter/MessageFormatter.php | 2 +- .../Formatter/MessageFormatterInterface.php | 4 +- .../lib/vendor/symfony/translation/LICENSE | 2 +- .../translation/Loader/ArrayLoader.php | 2 +- .../translation/Loader/CsvFileLoader.php | 8 +- .../symfony/translation/Loader/FileLoader.php | 7 +- .../translation/Loader/IcuDatFileLoader.php | 2 +- .../translation/Loader/IcuResFileLoader.php | 6 +- .../translation/Loader/IniFileLoader.php | 2 +- .../translation/Loader/JsonFileLoader.php | 2 +- .../translation/Loader/LoaderInterface.php | 8 +- .../translation/Loader/MoFileLoader.php | 6 +- .../translation/Loader/PhpFileLoader.php | 4 +- .../translation/Loader/PoFileLoader.php | 2 +- .../translation/Loader/QtFileLoader.php | 2 +- .../translation/Loader/XliffFileLoader.php | 4 +- .../translation/Loader/YamlFileLoader.php | 2 +- .../symfony/translation/LoggingTranslator.php | 16 +- .../symfony/translation/MessageCatalogue.php | 32 +- .../translation/MessageCatalogueInterface.php | 32 +- .../translation/MetadataAwareInterface.php | 6 +- .../symfony/translation/Provider/Dsn.php | 18 +- .../Provider/FilteringProvider.php | 6 +- .../translation/Provider/NullProvider.php | 2 - .../Provider/NullProviderFactory.php | 2 - .../TranslationProviderCollection.php | 10 +- .../TranslationProviderCollectionFactory.php | 8 +- .../PseudoLocalizationTranslator.php | 16 +- .../lib/vendor/symfony/translation/README.md | 15 + .../translation/Reader/TranslationReader.php | 4 +- .../Resources/bin/translation-status.php | 93 +- .../translation/Resources/data/parents.json | 2 - .../Test/ProviderFactoryTestCase.php | 12 +- .../translation/Test/ProviderTestCase.php | 22 +- .../translation/TranslatableMessage.php | 13 +- .../vendor/symfony/translation/Translator.php | 83 +- .../symfony/translation/TranslatorBag.php | 4 +- .../translation/TranslatorBagInterface.php | 15 +- .../translation/Util/ArrayConverter.php | 4 +- .../symfony/translation/Util/XliffUtils.php | 5 - .../translation/Writer/TranslationWriter.php | 9 +- .../vendor/symfony/translation/composer.json | 36 +- .../vendor/symfony/var-dumper/CHANGELOG.md | 7 + .../symfony/var-dumper/Caster/ArgsStub.php | 2 +- .../symfony/var-dumper/Caster/Caster.php | 4 - .../symfony/var-dumper/Caster/ClassStub.php | 4 +- .../symfony/var-dumper/Caster/ConstStub.php | 7 +- .../symfony/var-dumper/Caster/CutStub.php | 2 +- .../symfony/var-dumper/Caster/DateCaster.php | 5 +- .../symfony/var-dumper/Caster/DsPairStub.php | 2 +- .../var-dumper/Caster/ExceptionCaster.php | 38 +- .../symfony/var-dumper/Caster/FiberCaster.php | 43 + .../symfony/var-dumper/Caster/LinkStub.php | 6 +- .../var-dumper/Caster/MemcachedCaster.php | 4 +- .../var-dumper/Caster/MysqliCaster.php | 33 + .../var-dumper/Caster/RdKafkaCaster.php | 2 +- .../symfony/var-dumper/Caster/RedisCaster.php | 5 +- .../var-dumper/Caster/ReflectionCaster.php | 32 +- .../var-dumper/Caster/ResourceCaster.php | 7 +- .../symfony/var-dumper/Caster/SplCaster.php | 41 +- .../var-dumper/Caster/SymfonyCaster.php | 28 + .../var-dumper/Caster/XmlReaderCaster.php | 23 +- .../var-dumper/Cloner/AbstractCloner.php | 46 +- .../var-dumper/Cloner/ClonerInterface.php | 6 +- .../vendor/symfony/var-dumper/Cloner/Data.php | 96 +- .../var-dumper/Cloner/DumperInterface.php | 23 +- .../vendor/symfony/var-dumper/Cloner/Stub.php | 2 +- .../symfony/var-dumper/Cloner/VarCloner.php | 100 +- .../Command/Descriptor/CliDescriptor.php | 13 +- .../Command/Descriptor/HtmlDescriptor.php | 2 +- .../var-dumper/Command/ServerDumpCommand.php | 26 +- .../var-dumper/Dumper/AbstractDumper.php | 12 +- .../symfony/var-dumper/Dumper/CliDumper.php | 38 +- .../ContextProviderInterface.php | 3 - .../ContextProvider/SourceContextProvider.php | 6 +- .../Dumper/ContextualizedDumper.php | 2 +- .../symfony/var-dumper/Dumper/HtmlDumper.php | 12 +- .../inc/lib/vendor/symfony/var-dumper/LICENSE | 2 +- .../lib/vendor/symfony/var-dumper/README.md | 2 +- .../var-dumper/Resources/functions/dump.php | 11 +- .../symfony/var-dumper/Server/Connection.php | 8 +- .../symfony/var-dumper/Server/DumpServer.php | 8 +- .../var-dumper/Test/VarDumperTestTrait.php | 10 +- .../vendor/symfony/var-dumper/VarDumper.php | 7 +- .../vendor/symfony/var-dumper/composer.json | 12 +- .../collect/.github/workflows/run-tests.yml | 7 +- .../tightenco/collect/branch-commit-push.sh | 67 + .../vendor/tightenco/collect/composer.json | 10 +- .../Support/CanBeEscapedWhenCastToString.php | 14 + .../collect/src/Collect/Support/Arr.php | 72 +- .../src/Collect/Support/Collection.php | 253 ++- .../src/Collect/Support/Enumerable.php | 4 +- .../src/Collect/Support/LazyCollection.php | 174 +- .../Support/Traits/EnumeratesValues.php | 115 +- .../src/Collect/Support/Traits/Macroable.php | 10 + .../src/Collect/Support/Traits/Tappable.php | 2 +- .../collect/src/Collect/Support/alias.php | 4 + .../collect/src/Collect/Support/helpers.php | 65 +- .../inc/lib/vendor/twig/twig/.gitattributes | 1 + .../vendor/twig/twig/.github/workflows/ci.yml | 8 +- data/web/inc/lib/vendor/twig/twig/CHANGELOG | 1563 +---------------- data/web/inc/lib/vendor/twig/twig/LICENSE | 2 +- data/web/inc/lib/vendor/twig/twig/README.rst | 3 +- .../inc/lib/vendor/twig/twig/composer.json | 2 +- .../lib/vendor/twig/twig/doc/.doctor-rst.yaml | 54 - .../twig/twig/doc/_build/.requirements.txt | 6 - .../lib/vendor/twig/twig/doc/_build/Makefile | 153 -- .../lib/vendor/twig/twig/doc/_build/conf.py | 271 --- .../inc/lib/vendor/twig/twig/doc/advanced.rst | 911 ---------- data/web/inc/lib/vendor/twig/twig/doc/api.rst | 583 ------ .../vendor/twig/twig/doc/coding_standards.rst | 101 -- .../lib/vendor/twig/twig/doc/deprecated.rst | 6 - .../lib/vendor/twig/twig/doc/filters/abs.rst | 18 - .../vendor/twig/twig/doc/filters/batch.rst | 44 - .../twig/twig/doc/filters/capitalize.rst | 11 - .../vendor/twig/twig/doc/filters/column.rst | 24 - .../twig/doc/filters/convert_encoding.rst | 22 - .../twig/twig/doc/filters/country_name.rst | 44 - .../twig/twig/doc/filters/currency_name.rst | 47 - .../twig/twig/doc/filters/currency_symbol.rst | 47 - .../vendor/twig/twig/doc/filters/data_uri.rst | 55 - .../lib/vendor/twig/twig/doc/filters/date.rst | 78 - .../twig/twig/doc/filters/date_modify.rst | 20 - .../vendor/twig/twig/doc/filters/default.rst | 42 - .../vendor/twig/twig/doc/filters/escape.rst | 117 -- .../vendor/twig/twig/doc/filters/filter.rst | 55 - .../vendor/twig/twig/doc/filters/first.rst | 22 - .../vendor/twig/twig/doc/filters/format.rst | 18 - .../twig/twig/doc/filters/format_currency.rst | 77 - .../twig/twig/doc/filters/format_date.rst | 36 - .../twig/twig/doc/filters/format_datetime.rst | 73 - .../twig/twig/doc/filters/format_number.rst | 117 -- .../twig/twig/doc/filters/format_time.rst | 36 - .../twig/doc/filters/html_to_markdown.rst | 77 - .../vendor/twig/twig/doc/filters/index.rst | 60 - .../twig/twig/doc/filters/inky_to_html.rst | 42 - .../twig/twig/doc/filters/inline_css.rst | 66 - .../lib/vendor/twig/twig/doc/filters/join.rst | 32 - .../twig/twig/doc/filters/json_encode.rst | 23 - .../lib/vendor/twig/twig/doc/filters/keys.rst | 11 - .../twig/twig/doc/filters/language_name.rst | 47 - .../lib/vendor/twig/twig/doc/filters/last.rst | 22 - .../vendor/twig/twig/doc/filters/length.rst | 19 - .../twig/twig/doc/filters/locale_name.rst | 47 - .../vendor/twig/twig/doc/filters/lower.rst | 10 - .../lib/vendor/twig/twig/doc/filters/map.rst | 34 - .../twig/doc/filters/markdown_to_html.rst | 72 - .../vendor/twig/twig/doc/filters/merge.rst | 48 - .../vendor/twig/twig/doc/filters/nl2br.rst | 19 - .../twig/twig/doc/filters/number_format.rst | 51 - .../lib/vendor/twig/twig/doc/filters/raw.rst | 12 - .../vendor/twig/twig/doc/filters/reduce.rst | 29 - .../vendor/twig/twig/doc/filters/replace.rst | 27 - .../vendor/twig/twig/doc/filters/reverse.rst | 44 - .../vendor/twig/twig/doc/filters/round.rst | 34 - .../vendor/twig/twig/doc/filters/slice.rst | 68 - .../lib/vendor/twig/twig/doc/filters/slug.rst | 59 - .../lib/vendor/twig/twig/doc/filters/sort.rst | 42 - .../twig/twig/doc/filters/spaceless.rst | 56 - .../vendor/twig/twig/doc/filters/split.rst | 50 - .../twig/twig/doc/filters/striptags.rst | 29 - .../twig/twig/doc/filters/timezone_name.rst | 46 - .../vendor/twig/twig/doc/filters/title.rst | 11 - .../lib/vendor/twig/twig/doc/filters/trim.rst | 39 - .../lib/vendor/twig/twig/doc/filters/u.rst | 87 - .../vendor/twig/twig/doc/filters/upper.rst | 10 - .../twig/twig/doc/filters/url_encode.rst | 23 - .../twig/twig/doc/functions/attribute.rst | 23 - .../vendor/twig/twig/doc/functions/block.rst | 37 - .../twig/twig/doc/functions/constant.rst | 23 - .../twig/doc/functions/country_timezones.rst | 32 - .../vendor/twig/twig/doc/functions/cycle.rst | 28 - .../vendor/twig/twig/doc/functions/date.rst | 44 - .../vendor/twig/twig/doc/functions/dump.rst | 66 - .../twig/twig/doc/functions/html_classes.rst | 35 - .../twig/twig/doc/functions/include.rst | 77 - .../vendor/twig/twig/doc/functions/index.rst | 22 - .../vendor/twig/twig/doc/functions/max.rst | 17 - .../vendor/twig/twig/doc/functions/min.rst | 17 - .../vendor/twig/twig/doc/functions/parent.rst | 22 - .../vendor/twig/twig/doc/functions/random.rst | 25 - .../vendor/twig/twig/doc/functions/range.rst | 58 - .../vendor/twig/twig/doc/functions/source.rst | 26 - .../doc/functions/template_from_string.rst | 37 - .../inc/lib/vendor/twig/twig/doc/index.rst | 19 - .../lib/vendor/twig/twig/doc/installation.rst | 10 - .../lib/vendor/twig/twig/doc/internals.rst | 140 -- .../inc/lib/vendor/twig/twig/doc/intro.rst | 74 - .../inc/lib/vendor/twig/twig/doc/recipes.rst | 531 ------ .../lib/vendor/twig/twig/doc/tags/apply.rst | 20 - .../vendor/twig/twig/doc/tags/autoescape.rst | 61 - .../lib/vendor/twig/twig/doc/tags/block.rst | 12 - .../lib/vendor/twig/twig/doc/tags/cache.rst | 113 -- .../vendor/twig/twig/doc/tags/deprecated.rst | 27 - .../inc/lib/vendor/twig/twig/doc/tags/do.rst | 9 - .../lib/vendor/twig/twig/doc/tags/embed.rst | 177 -- .../lib/vendor/twig/twig/doc/tags/extends.rst | 263 --- .../lib/vendor/twig/twig/doc/tags/flush.rst | 14 - .../inc/lib/vendor/twig/twig/doc/tags/for.rst | 141 -- .../lib/vendor/twig/twig/doc/tags/from.rst | 6 - .../inc/lib/vendor/twig/twig/doc/tags/if.rst | 79 - .../lib/vendor/twig/twig/doc/tags/import.rst | 6 - .../lib/vendor/twig/twig/doc/tags/include.rst | 110 -- .../lib/vendor/twig/twig/doc/tags/index.rst | 26 - .../lib/vendor/twig/twig/doc/tags/macro.rst | 140 -- .../lib/vendor/twig/twig/doc/tags/sandbox.rst | 30 - .../inc/lib/vendor/twig/twig/doc/tags/set.rst | 78 - .../inc/lib/vendor/twig/twig/doc/tags/use.rst | 117 -- .../vendor/twig/twig/doc/tags/verbatim.rst | 16 - .../lib/vendor/twig/twig/doc/tags/with.rst | 41 - .../lib/vendor/twig/twig/doc/templates.rst | 859 --------- .../vendor/twig/twig/doc/tests/constant.rst | 19 - .../vendor/twig/twig/doc/tests/defined.rst | 30 - .../twig/twig/doc/tests/divisibleby.rst | 10 - .../lib/vendor/twig/twig/doc/tests/empty.rst | 18 - .../lib/vendor/twig/twig/doc/tests/even.rst | 12 - .../lib/vendor/twig/twig/doc/tests/index.rst | 15 - .../vendor/twig/twig/doc/tests/iterable.rst | 16 - .../lib/vendor/twig/twig/doc/tests/null.rst | 12 - .../lib/vendor/twig/twig/doc/tests/odd.rst | 12 - .../lib/vendor/twig/twig/doc/tests/sameas.rst | 11 - .../inc/lib/vendor/twig/twig/drupal_test.sh | 50 - .../twig/twig/src/Cache/FilesystemCache.php | 2 +- .../inc/lib/vendor/twig/twig/src/Compiler.php | 2 +- .../lib/vendor/twig/twig/src/Environment.php | 38 +- .../twig/twig/src/Extension/CoreExtension.php | 152 +- .../twig/src/Extension/EscaperExtension.php | 4 +- .../inc/lib/vendor/twig/twig/src/Markup.php | 5 + .../lib/vendor/twig/twig/src/Node/Node.php | 1 + .../inc/lib/vendor/twig/twig/src/Parser.php | 2 +- .../NodeVisitor/ProfilerNodeVisitor.php | 22 +- .../twig/src/Test/IntegrationTestCase.php | 2 +- .../twig/src/Util/TemplateDirIterator.php | 8 + 940 files changed, 7649 insertions(+), 14226 deletions(-) delete mode 100644 data/conf/rspamd/lua/ivm-sg.lua mode change 120000 => 100755 data/web/inc/lib/vendor/bin/carbon mode change 120000 => 100755 data/web/inc/lib/vendor/bin/minifycss mode change 120000 => 100755 data/web/inc/lib/vendor/bin/minifyjs mode change 120000 => 100755 data/web/inc/lib/vendor/bin/var-dump-server create mode 100644 data/web/inc/lib/vendor/ddeboer/imap/.php-cs-fixer.php create mode 100644 data/web/inc/lib/vendor/directorytree/ldaprecord/src/Events/NullDispatcher.php create mode 100644 data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/MultipleObjectsFoundException.php create mode 100644 data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/ObjectsNotFoundException.php create mode 100644 data/web/inc/lib/vendor/illuminate/contracts/Database/Eloquent/Builder.php create mode 100644 data/web/inc/lib/vendor/illuminate/contracts/Database/Query/Builder.php delete mode 100644 data/web/inc/lib/vendor/illuminate/contracts/Filesystem/FileExistsException.php create mode 100644 data/web/inc/lib/vendor/illuminate/contracts/Foundation/ExceptionRenderer.php create mode 100644 data/web/inc/lib/vendor/illuminate/contracts/Foundation/MaintenanceMode.php create mode 100644 data/web/inc/lib/vendor/illuminate/contracts/Support/CanBeEscapedWhenCastToString.php create mode 100644 data/web/inc/lib/vendor/illuminate/contracts/Support/ValidatedData.php create mode 100644 data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php create mode 100644 data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php create mode 100644 data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php create mode 100644 data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/TranslatorWeakType.php create mode 100644 data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php create mode 100644 data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php create mode 100644 data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/DeprecatedProperties.php create mode 100644 data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php create mode 100644 data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php delete mode 100644 data/web/inc/lib/vendor/phpmailer/phpmailer/phpunit.xml.dist create mode 100644 data/web/inc/lib/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php delete mode 100644 data/web/inc/lib/vendor/psr/log/Psr/Log/AbstractLogger.php delete mode 100644 data/web/inc/lib/vendor/psr/log/Psr/Log/Test/DummyTest.php delete mode 100644 data/web/inc/lib/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php delete mode 100644 data/web/inc/lib/vendor/psr/log/Psr/Log/Test/TestLogger.php create mode 100644 data/web/inc/lib/vendor/psr/log/src/AbstractLogger.php rename data/web/inc/lib/vendor/psr/log/{Psr/Log => src}/InvalidArgumentException.php (100%) rename data/web/inc/lib/vendor/psr/log/{Psr/Log => src}/LogLevel.php (100%) rename data/web/inc/lib/vendor/psr/log/{Psr/Log => src}/LoggerAwareInterface.php (79%) rename data/web/inc/lib/vendor/psr/log/{Psr/Log => src}/LoggerAwareTrait.php (75%) rename data/web/inc/lib/vendor/psr/log/{Psr/Log => src}/LoggerInterface.php (66%) rename data/web/inc/lib/vendor/psr/log/{Psr/Log => src}/LoggerTrait.php (69%) rename data/web/inc/lib/vendor/psr/log/{Psr/Log => src}/NullLogger.php (78%) delete mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/demo/loader.php create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/_config.yml create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/_layouts/post.html create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/assets/css/style.scss create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/getting-started.md create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/improved-code-verification.md create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/index.md create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/optional-configuration.md create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/qr-codes.md create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/qr-codes/bacon.md create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/qr-codes/endroid.md create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/qr-codes/image-charts.md create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/qr-codes/qr-server.md create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/docs/qr-codes/qrickit.md create mode 100644 data/web/inc/lib/vendor/robthree/twofactorauth/lib/Providers/Qr/GoogleChartsQrCodeProvider.php delete mode 100644 data/web/inc/lib/vendor/symfony/deprecation-contracts/.gitignore delete mode 100644 data/web/inc/lib/vendor/symfony/deprecation-contracts/CHANGELOG.md delete mode 100644 data/web/inc/lib/vendor/symfony/deprecation-contracts/LICENSE delete mode 100644 data/web/inc/lib/vendor/symfony/deprecation-contracts/README.md delete mode 100644 data/web/inc/lib/vendor/symfony/deprecation-contracts/composer.json delete mode 100644 data/web/inc/lib/vendor/symfony/deprecation-contracts/function.php create mode 100644 data/web/inc/lib/vendor/symfony/var-dumper/Caster/FiberCaster.php create mode 100644 data/web/inc/lib/vendor/symfony/var-dumper/Caster/MysqliCaster.php create mode 100755 data/web/inc/lib/vendor/tightenco/collect/branch-commit-push.sh create mode 100644 data/web/inc/lib/vendor/tightenco/collect/src/Collect/Contracts/Support/CanBeEscapedWhenCastToString.php delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/.doctor-rst.yaml delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/_build/.requirements.txt delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/_build/Makefile delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/_build/conf.py delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/advanced.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/api.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/coding_standards.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/deprecated.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/abs.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/batch.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/capitalize.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/column.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/convert_encoding.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/country_name.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/currency_name.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/currency_symbol.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/data_uri.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/date.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/date_modify.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/default.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/escape.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/filter.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/first.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/format.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/format_currency.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/format_date.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/format_datetime.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/format_number.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/format_time.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/html_to_markdown.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/index.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/inky_to_html.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/inline_css.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/join.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/json_encode.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/keys.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/language_name.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/last.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/length.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/locale_name.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/lower.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/map.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/markdown_to_html.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/merge.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/nl2br.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/number_format.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/raw.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/reduce.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/replace.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/reverse.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/round.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/slice.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/slug.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/sort.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/spaceless.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/split.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/striptags.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/timezone_name.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/title.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/trim.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/u.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/upper.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/filters/url_encode.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/attribute.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/block.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/constant.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/country_timezones.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/cycle.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/date.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/dump.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/html_classes.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/include.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/index.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/max.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/min.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/parent.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/random.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/range.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/source.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/functions/template_from_string.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/index.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/installation.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/internals.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/intro.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/recipes.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/apply.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/autoescape.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/block.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/cache.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/deprecated.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/do.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/embed.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/extends.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/flush.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/for.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/from.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/if.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/import.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/include.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/index.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/macro.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/sandbox.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/set.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/use.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/verbatim.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tags/with.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/templates.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tests/constant.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tests/defined.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tests/divisibleby.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tests/empty.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tests/even.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tests/index.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tests/iterable.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tests/null.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tests/odd.rst delete mode 100644 data/web/inc/lib/vendor/twig/twig/doc/tests/sameas.rst delete mode 100755 data/web/inc/lib/vendor/twig/twig/drupal_test.sh diff --git a/data/conf/rspamd/lua/ivm-sg.lua b/data/conf/rspamd/lua/ivm-sg.lua deleted file mode 100644 index 6642fe4d..00000000 --- a/data/conf/rspamd/lua/ivm-sg.lua +++ /dev/null @@ -1,61 +0,0 @@ --- Thanks to https://raw.githubusercontent.com/fatalbanana - -local lua_maps = require 'lua_maps' -local rspamd_regexp = require 'rspamd_regexp' -local rspamd_util = require 'rspamd_util' - -local ivm_sendgrid_ids = lua_maps.map_add_from_ucl( - 'https://www.invaluement.com/spdata/sendgrid-id-dnsbl.txt', - 'set', - 'Invaluement Service Provider DNSBL: Sendgrid IDs' -) - -local ivm_sendgrid_envfromdomains = lua_maps.map_add_from_ucl( - 'https://www.invaluement.com/spdata/sendgrid-envelopefromdomain-dnsbl.txt', - 'set', - 'Invaluement Service Provider DNSBL: Sendgrid envelope domains' -) - -local cb_id = rspamd_config:register_symbol({ - name = 'IVM_SENDGRID', - callback = function(task) - -- Is it Sendgrid? - local sg_hdr = task:get_header('X-SG-EID') - if not sg_hdr then return end - - -- Get original envelope from - local env_from = task:get_from{'smtp', 'orig'} - if not env_from then return end - - -- Check normalised domain in domains list - if ivm_sendgrid_envfromdomains and ivm_sendgrid_envfromdomains:get_key(rspamd_util.get_tld(env_from[1].domain)) then - task:insert_result('IVM_SENDGRID_DOMAIN', 1.0) - end - - -- Check ID in ID list - local lp_re = rspamd_regexp.create_cached([[^bounces\+(\d+)-]]) - local res = lp_re:search(env_from[1].user, true, true) - if not res then return end - if ivm_sendgrid_ids and ivm_sendgrid_ids:get_key(res[1][2]) then - task:insert_result('IVM_SENDGRID_ID', 1.0) - end - end, - description = 'Invaluement Service Provider DNSBL: Sendgrid', - type = 'callback', -}) - -rspamd_config:register_symbol({ - name = 'IVM_SENDGRID_DOMAIN', - parent = cb_id, - group = 'ivmspdnsbl', - score = 8.0, - type = 'virtual', -}) - -rspamd_config:register_symbol({ - name = 'IVM_SENDGRID_ID', - parent = cb_id, - group = 'ivmspdnsbl', - score = 8.0, - type = 'virtual', -}) diff --git a/data/web/inc/lib/composer.lock b/data/web/inc/lib/composer.lock index b1507525..870382f3 100644 --- a/data/web/inc/lib/composer.lock +++ b/data/web/inc/lib/composer.lock @@ -62,35 +62,40 @@ "oauth", "oauth2" ], + "support": { + "issues": "https://github.com/bshaffer/oauth2-server-php/issues", + "source": "https://github.com/bshaffer/oauth2-server-php/tree/master" + }, "time": "2018-12-04T00:29:32+00:00" }, { "name": "ddeboer/imap", - "version": "1.12.1", + "version": "1.13.1", "source": { "type": "git", "url": "https://github.com/ddeboer/imap.git", - "reference": "dbed05ca67b93509345a820b2859de10c48948fb" + "reference": "8b772d04b1deadb5df13782fb78c4b648f77496e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ddeboer/imap/zipball/dbed05ca67b93509345a820b2859de10c48948fb", - "reference": "dbed05ca67b93509345a820b2859de10c48948fb", + "url": "https://api.github.com/repos/ddeboer/imap/zipball/8b772d04b1deadb5df13782fb78c4b648f77496e", + "reference": "8b772d04b1deadb5df13782fb78c4b648f77496e", "shasum": "" }, "require": { "ext-iconv": "*", "ext-imap": "*", "ext-mbstring": "*", - "php": "^7.4 || ^8.0" + "php": "^8.0.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18.6", - "laminas/laminas-mail": "^2.14.0", - "phpstan/phpstan": "^0.12.84", - "phpstan/phpstan-phpunit": "^0.12.18", - "phpstan/phpstan-strict-rules": "^0.12.9", - "phpunit/phpunit": "^9.5.4" + "friendsofphp/php-cs-fixer": "^v3.4.0", + "laminas/laminas-mail": "^2.15.1", + "malukenho/mcbumpface": "^1.1.5", + "phpstan/phpstan": "^1.3.3", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.5.11" }, "type": "library", "autoload": { @@ -124,7 +129,7 @@ ], "support": { "issues": "https://github.com/ddeboer/imap/issues", - "source": "https://github.com/ddeboer/imap/tree/1.12.1" + "source": "https://github.com/ddeboer/imap/tree/1.13.1" }, "funding": [ { @@ -136,35 +141,35 @@ "type": "github" } ], - "time": "2021-04-27T08:38:46+00:00" + "time": "2022-01-10T10:53:05+00:00" }, { "name": "directorytree/ldaprecord", - "version": "v2.6.3", + "version": "v2.10.1", "source": { "type": "git", "url": "https://github.com/DirectoryTree/LdapRecord.git", - "reference": "5c93ec6d1ef458290825a8b0a148946dce7c1e7a" + "reference": "bf512d9af7a7b0e2ed7a666ab29cefdd027bee88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/5c93ec6d1ef458290825a8b0a148946dce7c1e7a", - "reference": "5c93ec6d1ef458290825a8b0a148946dce7c1e7a", + "url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/bf512d9af7a7b0e2ed7a666ab29cefdd027bee88", + "reference": "bf512d9af7a7b0e2ed7a666ab29cefdd027bee88", "shasum": "" }, "require": { "ext-json": "*", "ext-ldap": "*", - "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0", + "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0", "nesbot/carbon": "^1.0|^2.0", "php": ">=7.3", - "psr/log": "^1.0", - "psr/simple-cache": "^1.0", + "psr/log": "*", + "psr/simple-cache": "^1.0|^2.0", "tightenco/collect": "^5.6|^6.0|^7.0|^8.0" }, "require-dev": { "mockery/mockery": "^1.0", - "phpunit/phpunit": "^8.0", + "phpunit/phpunit": "^9.0", "spatie/ray": "^1.24" }, "type": "library", @@ -209,31 +214,31 @@ "type": "github" } ], - "time": "2021-08-05T21:52:43+00:00" + "time": "2022-02-25T16:00:51+00:00" }, { "name": "illuminate/contracts", - "version": "v8.53.1", + "version": "v9.3.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "504a34286a1b4c5421c43087d6bd4e176138f6fb" + "reference": "bf4b3c254c49d28157645d01e4883b5951b1e1d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/504a34286a1b4c5421c43087d6bd4e176138f6fb", - "reference": "504a34286a1b4c5421c43087d6bd4e176138f6fb", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/bf4b3c254c49d28157645d01e4883b5951b1e1d0", + "reference": "bf4b3c254c49d28157645d01e4883b5951b1e1d0", "shasum": "" }, "require": { - "php": "^7.3|^8.0", - "psr/container": "^1.0", - "psr/simple-cache": "^1.0" + "php": "^8.0.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/simple-cache": "^1.0|^2.0|^3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.x-dev" + "dev-master": "9.x-dev" } }, "autoload": { @@ -257,7 +262,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-08-03T14:03:47+00:00" + "time": "2022-02-22T14:45:39+00:00" }, { "name": "matthiasmullie/minify", @@ -384,6 +389,10 @@ "paths", "relative" ], + "support": { + "issues": "https://github.com/matthiasmullie/path-converter/issues", + "source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3" + }, "time": "2019-02-05T23:41:09+00:00" }, { @@ -438,16 +447,16 @@ }, { "name": "nesbot/carbon", - "version": "2.51.1", + "version": "2.57.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922" + "reference": "4a54375c21eea4811dbd1149fe6b246517554e78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922", - "reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a54375c21eea4811dbd1149fe6b246517554e78", + "reference": "4a54375c21eea4811dbd1149fe6b246517554e78", "shasum": "" }, "require": { @@ -455,15 +464,16 @@ "php": "^7.1.8 || ^8.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16", - "symfony/translation": "^3.4 || ^4.0 || ^5.0" + "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { + "doctrine/dbal": "^2.0 || ^3.0", "doctrine/orm": "^2.7", - "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54", + "phpstan/phpstan": "^0.12.54 || ^1.0", "phpunit/phpunit": "^7.5.20 || ^8.5.14", "squizlabs/php_codesniffer": "^3.4" }, @@ -515,6 +525,7 @@ "time" ], "support": { + "docs": "https://carbon.nesbot.com/docs", "issues": "https://github.com/briannesbitt/Carbon/issues", "source": "https://github.com/briannesbitt/Carbon" }, @@ -528,7 +539,7 @@ "type": "tidelift" } ], - "time": "2021-07-28T13:16:28+00:00" + "time": "2022-02-13T18:13:33+00:00" }, { "name": "paragonie/random_compat", @@ -673,16 +684,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.5.0", + "version": "v6.6.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c" + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1", + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1", "shasum": "" }, "require": { @@ -694,10 +705,12 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", + "php-parallel-lint/php-console-highlighter": "^0.5.0", + "php-parallel-lint/php-parallel-lint": "^1.3.1", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.5.6", - "yoast/phpunit-polyfills": "^0.2.0" + "squizlabs/php_codesniffer": "^3.6.2", + "yoast/phpunit-polyfills": "^1.0.0" }, "suggest": { "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", @@ -737,7 +750,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0" }, "funding": [ { @@ -745,26 +758,31 @@ "type": "github" } ], - "time": "2021-06-16T14:33:43+00:00" + "time": "2022-02-28T15:31:21+00:00" }, { "name": "psr/container", - "version": "1.1.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -791,36 +809,36 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -841,31 +859,31 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { "name": "psr/simple-cache", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/8707bf3cea6f710bf6ef05491234e3ab06f6432a", + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -880,7 +898,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -892,22 +910,22 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" + "source": "https://github.com/php-fig/simple-cache/tree/2.0.0" }, - "time": "2017-10-23T01:57:42+00:00" + "time": "2021-10-29T13:22:09+00:00" }, { "name": "robthree/twofactorauth", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/RobThree/TwoFactorAuth.git", - "reference": "30a38627ae1e7c9399dae67e265063cd6ec5276c" + "reference": "5afcb45282f1c75562a48d479ecd1732c9bdb11b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RobThree/TwoFactorAuth/zipball/30a38627ae1e7c9399dae67e265063cd6ec5276c", - "reference": "30a38627ae1e7c9399dae67e265063cd6ec5276c", + "url": "https://api.github.com/repos/RobThree/TwoFactorAuth/zipball/5afcb45282f1c75562a48d479ecd1732c9bdb11b", + "reference": "5afcb45282f1c75562a48d479ecd1732c9bdb11b", "shasum": "" }, "require": { @@ -964,7 +982,7 @@ "type": "github" } ], - "time": "2021-03-09T18:24:05+00:00" + "time": "2021-10-20T12:19:55+00:00" }, { "name": "soundasleep/html2text", @@ -1014,92 +1032,33 @@ "php", "text" ], + "support": { + "email": "support@jevon.org", + "issues": "https://github.com/soundasleep/html2text/issues", + "source": "https://github.com/soundasleep/html2text/tree/master" + }, "time": "2017-04-19T22:01:50+00:00" }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-03-23T23:28:01+00:00" - }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, @@ -1114,12 +1073,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1144,7 +1103,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" }, "funding": [ { @@ -1160,25 +1119,28 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-10-20T20:35:02+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, @@ -1193,12 +1155,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1224,7 +1186,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" }, "funding": [ { @@ -1240,20 +1202,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2021-11-30T18:21:41+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.23.1", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", "shasum": "" }, "require": { @@ -1270,12 +1232,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -1307,7 +1269,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" }, "funding": [ { @@ -1323,50 +1285,50 @@ "type": "tidelift" } ], - "time": "2021-07-28T13:41:28+00:00" + "time": "2021-09-13T13:58:33+00:00" }, { "name": "symfony/translation", - "version": "v5.3.4", + "version": "v6.0.5", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "d89ad7292932c2699cbe4af98d72c5c6bbc504c1" + "reference": "e69501c71107cc3146b32aaa45f4edd0c3427875" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/d89ad7292932c2699cbe4af98d72c5c6bbc504c1", - "reference": "d89ad7292932c2699cbe4af98d72c5c6bbc504c1", + "url": "https://api.github.com/repos/symfony/translation/zipball/e69501c71107cc3146b32aaa45f4edd0c3427875", + "reference": "e69501c71107cc3146b32aaa45f4edd0c3427875", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^2.3" + "symfony/translation-contracts": "^2.3|^3.0" }, "conflict": { - "symfony/config": "<4.4", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4" + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/twig-bundle": "<5.4", + "symfony/yaml": "<5.4" }, "provide": { - "symfony/translation-implementation": "2.3" + "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0", - "symfony/console": "^4.4|^5.0", - "symfony/dependency-injection": "^5.0", - "symfony/finder": "^4.4|^5.0", - "symfony/http-kernel": "^5.0", - "symfony/intl": "^4.4|^5.0", + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-client-contracts": "^1.1|^2.0|^3.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/intl": "^5.4|^6.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/service-contracts": "^1.1.2|^2", - "symfony/yaml": "^4.4|^5.0" + "symfony/service-contracts": "^1.1.2|^2|^3", + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", @@ -1402,7 +1364,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.3.4" + "source": "https://github.com/symfony/translation/tree/v6.0.5" }, "funding": [ { @@ -1418,24 +1380,24 @@ "type": "tidelift" } ], - "time": "2021-07-25T09:39:16+00:00" + "time": "2022-02-09T15:52:48+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.4.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "95c812666f3e91db75385749fe219c5e494c7f95" + "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/95c812666f3e91db75385749fe219c5e494c7f95", - "reference": "95c812666f3e91db75385749fe219c5e494c7f95", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/1b6ea5a7442af5a12dba3dbd6d71034b5b234e77", + "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=8.0.2" }, "suggest": { "symfony/translation-implementation": "" @@ -1443,7 +1405,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -1480,7 +1442,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.0.0" }, "funding": [ { @@ -1496,35 +1458,35 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2021-09-07T12:43:40+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.3.6", + "version": "v6.0.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0" + "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0", - "reference": "3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/60d6a756d5f485df5e6e40b337334848f79f61ce", + "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4" + "symfony/console": "<5.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -1568,7 +1530,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.3.6" + "source": "https://github.com/symfony/var-dumper/tree/v6.0.5" }, "funding": [ { @@ -1584,25 +1546,25 @@ "type": "tidelift" } ], - "time": "2021-07-27T01:56:02+00:00" + "time": "2022-02-21T17:15:17+00:00" }, { "name": "tightenco/collect", - "version": "v8.34.0", + "version": "v8.83.2", "source": { "type": "git", "url": "https://github.com/tighten/collect.git", - "reference": "b069783ab0c547bb894ebcf8e7f6024bb401f9d2" + "reference": "d9c66d586ec2d216d8a31283d73f8df1400cc722" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tighten/collect/zipball/b069783ab0c547bb894ebcf8e7f6024bb401f9d2", - "reference": "b069783ab0c547bb894ebcf8e7f6024bb401f9d2", + "url": "https://api.github.com/repos/tighten/collect/zipball/d9c66d586ec2d216d8a31283d73f8df1400cc722", + "reference": "d9c66d586ec2d216d8a31283d73f8df1400cc722", "shasum": "" }, "require": { - "php": "^7.2|^8.0", - "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0" + "php": "^7.3|^8.0", + "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { "mockery/mockery": "^1.0", @@ -1636,22 +1598,22 @@ ], "support": { "issues": "https://github.com/tighten/collect/issues", - "source": "https://github.com/tighten/collect/tree/v8.34.0" + "source": "https://github.com/tighten/collect/tree/v8.83.2" }, - "time": "2021-03-29T21:29:00+00:00" + "time": "2022-02-16T16:15:54+00:00" }, { "name": "twig/twig", - "version": "v3.3.2", + "version": "v3.3.8", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "21578f00e83d4a82ecfa3d50752b609f13de6790" + "reference": "972d8604a92b7054828b539f2febb0211dd5945c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/21578f00e83d4a82ecfa3d50752b609f13de6790", - "reference": "21578f00e83d4a82ecfa3d50752b609f13de6790", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c", + "reference": "972d8604a92b7054828b539f2febb0211dd5945c", "shasum": "" }, "require": { @@ -1661,7 +1623,7 @@ }, "require-dev": { "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9" + "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" }, "type": "library", "extra": { @@ -1702,7 +1664,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.3.2" + "source": "https://github.com/twigphp/Twig/tree/v3.3.8" }, "funding": [ { @@ -1714,7 +1676,7 @@ "type": "tidelift" } ], - "time": "2021-05-16T12:14:13+00:00" + "time": "2022-02-04T06:59:48+00:00" }, { "name": "yubico/u2flib-server", @@ -1751,6 +1713,10 @@ ], "description": "Library for U2F implementation", "homepage": "https://developers.yubico.com/php-u2flib-server", + "support": { + "issues": "https://github.com/Yubico/php-u2flib-server/issues", + "source": "https://github.com/Yubico/php-u2flib-server/tree/1.0.2" + }, "time": "2018-09-07T08:16:44+00:00" } ], @@ -1762,5 +1728,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.2.0" } diff --git a/data/web/inc/lib/vendor/bin/carbon b/data/web/inc/lib/vendor/bin/carbon deleted file mode 120000 index 0da48041..00000000 --- a/data/web/inc/lib/vendor/bin/carbon +++ /dev/null @@ -1 +0,0 @@ -../nesbot/carbon/bin/carbon \ No newline at end of file diff --git a/data/web/inc/lib/vendor/bin/carbon b/data/web/inc/lib/vendor/bin/carbon new file mode 100755 index 00000000..7b63379a --- /dev/null +++ b/data/web/inc/lib/vendor/bin/carbon @@ -0,0 +1,97 @@ +#!/usr/bin/env php +handle = fopen($opened_path, $mode); + $this->position = 0; + + // remove all traces of this stream wrapper once it has been used + stream_wrapper_unregister('composer-bin-proxy'); + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return fstat($this->handle); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + } + } + + if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { + include("composer-bin-proxy://" . __DIR__ . '/..'.'/nesbot/carbon/bin/carbon'); + exit(0); + } +} + +include __DIR__ . '/..'.'/nesbot/carbon/bin/carbon'; diff --git a/data/web/inc/lib/vendor/bin/minifycss b/data/web/inc/lib/vendor/bin/minifycss deleted file mode 120000 index 04f60a4b..00000000 --- a/data/web/inc/lib/vendor/bin/minifycss +++ /dev/null @@ -1 +0,0 @@ -../matthiasmullie/minify/bin/minifycss \ No newline at end of file diff --git a/data/web/inc/lib/vendor/bin/minifycss b/data/web/inc/lib/vendor/bin/minifycss new file mode 100755 index 00000000..0604366b --- /dev/null +++ b/data/web/inc/lib/vendor/bin/minifycss @@ -0,0 +1,97 @@ +#!/usr/bin/env php +handle = fopen($opened_path, $mode); + $this->position = 0; + + // remove all traces of this stream wrapper once it has been used + stream_wrapper_unregister('composer-bin-proxy'); + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return fstat($this->handle); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + } + } + + if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { + include("composer-bin-proxy://" . __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifycss'); + exit(0); + } +} + +include __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifycss'; diff --git a/data/web/inc/lib/vendor/bin/minifyjs b/data/web/inc/lib/vendor/bin/minifyjs deleted file mode 120000 index 61124467..00000000 --- a/data/web/inc/lib/vendor/bin/minifyjs +++ /dev/null @@ -1 +0,0 @@ -../matthiasmullie/minify/bin/minifyjs \ No newline at end of file diff --git a/data/web/inc/lib/vendor/bin/minifyjs b/data/web/inc/lib/vendor/bin/minifyjs new file mode 100755 index 00000000..f8ee9123 --- /dev/null +++ b/data/web/inc/lib/vendor/bin/minifyjs @@ -0,0 +1,97 @@ +#!/usr/bin/env php +handle = fopen($opened_path, $mode); + $this->position = 0; + + // remove all traces of this stream wrapper once it has been used + stream_wrapper_unregister('composer-bin-proxy'); + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return fstat($this->handle); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + } + } + + if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { + include("composer-bin-proxy://" . __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifyjs'); + exit(0); + } +} + +include __DIR__ . '/..'.'/matthiasmullie/minify/bin/minifyjs'; diff --git a/data/web/inc/lib/vendor/bin/var-dump-server b/data/web/inc/lib/vendor/bin/var-dump-server deleted file mode 120000 index 6bd4e93d..00000000 --- a/data/web/inc/lib/vendor/bin/var-dump-server +++ /dev/null @@ -1 +0,0 @@ -../symfony/var-dumper/Resources/bin/var-dump-server \ No newline at end of file diff --git a/data/web/inc/lib/vendor/bin/var-dump-server b/data/web/inc/lib/vendor/bin/var-dump-server new file mode 100755 index 00000000..1eafd5d9 --- /dev/null +++ b/data/web/inc/lib/vendor/bin/var-dump-server @@ -0,0 +1,97 @@ +#!/usr/bin/env php +handle = fopen($opened_path, $mode); + $this->position = 0; + + // remove all traces of this stream wrapper once it has been used + stream_wrapper_unregister('composer-bin-proxy'); + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return fstat($this->handle); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + } + } + + if (function_exists('stream_wrapper_register') && stream_wrapper_register('composer-bin-proxy', 'Composer\BinProxyWrapper')) { + include("composer-bin-proxy://" . __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'); + exit(0); + } +} + +include __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'; diff --git a/data/web/inc/lib/vendor/composer/ClassLoader.php b/data/web/inc/lib/vendor/composer/ClassLoader.php index 6d0c3f2d..afef3fa2 100644 --- a/data/web/inc/lib/vendor/composer/ClassLoader.php +++ b/data/web/inc/lib/vendor/composer/ClassLoader.php @@ -42,30 +42,75 @@ namespace Composer\Autoload; */ class ClassLoader { + /** @var ?string */ private $vendorDir; // PSR-4 + /** + * @var array[] + * @psalm-var array> + */ private $prefixLengthsPsr4 = array(); + /** + * @var array[] + * @psalm-var array> + */ private $prefixDirsPsr4 = array(); + /** + * @var array[] + * @psalm-var array + */ private $fallbackDirsPsr4 = array(); // PSR-0 + /** + * @var array[] + * @psalm-var array> + */ private $prefixesPsr0 = array(); + /** + * @var array[] + * @psalm-var array + */ private $fallbackDirsPsr0 = array(); + /** @var bool */ private $useIncludePath = false; + + /** + * @var string[] + * @psalm-var array + */ private $classMap = array(); + + /** @var bool */ private $classMapAuthoritative = false; + + /** + * @var bool[] + * @psalm-var array + */ private $missingClasses = array(); + + /** @var ?string */ private $apcuPrefix; + /** + * @var self[] + */ private static $registeredLoaders = array(); + /** + * @param ?string $vendorDir + */ public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; } + /** + * @return string[] + */ public function getPrefixes() { if (!empty($this->prefixesPsr0)) { @@ -75,28 +120,47 @@ class ClassLoader return array(); } + /** + * @return array[] + * @psalm-return array> + */ public function getPrefixesPsr4() { return $this->prefixDirsPsr4; } + /** + * @return array[] + * @psalm-return array + */ public function getFallbackDirs() { return $this->fallbackDirsPsr0; } + /** + * @return array[] + * @psalm-return array + */ public function getFallbackDirsPsr4() { return $this->fallbackDirsPsr4; } + /** + * @return string[] Array of classname => path + * @psalm-return array + */ public function getClassMap() { return $this->classMap; } /** - * @param array $classMap Class to filename map + * @param string[] $classMap Class to filename map + * @psalm-param array $classMap + * + * @return void */ public function addClassMap(array $classMap) { @@ -111,9 +175,11 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void */ public function add($prefix, $paths, $prepend = false) { @@ -156,11 +222,13 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException + * + * @return void */ public function addPsr4($prefix, $paths, $prepend = false) { @@ -204,8 +272,10 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 base directories + * + * @return void */ public function set($prefix, $paths) { @@ -220,10 +290,12 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException + * + * @return void */ public function setPsr4($prefix, $paths) { @@ -243,6 +315,8 @@ class ClassLoader * Turns on searching the include path for class files. * * @param bool $useIncludePath + * + * @return void */ public function setUseIncludePath($useIncludePath) { @@ -265,6 +339,8 @@ class ClassLoader * that have not been registered with the class map. * * @param bool $classMapAuthoritative + * + * @return void */ public function setClassMapAuthoritative($classMapAuthoritative) { @@ -285,6 +361,8 @@ class ClassLoader * APCu prefix to use to cache found/not-found classes, if the extension is enabled. * * @param string|null $apcuPrefix + * + * @return void */ public function setApcuPrefix($apcuPrefix) { @@ -305,6 +383,8 @@ class ClassLoader * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void */ public function register($prepend = false) { @@ -324,6 +404,8 @@ class ClassLoader /** * Unregisters this instance as an autoloader. + * + * @return void */ public function unregister() { @@ -403,6 +485,11 @@ class ClassLoader return self::$registeredLoaders; } + /** + * @param string $class + * @param string $ext + * @return string|false + */ private function findFileWithExtension($class, $ext) { // PSR-4 lookup @@ -474,6 +561,10 @@ class ClassLoader * Scope isolated include. * * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + * @private */ function includeFile($file) { diff --git a/data/web/inc/lib/vendor/composer/InstalledVersions.php b/data/web/inc/lib/vendor/composer/InstalledVersions.php index b3a4e161..d50e0c9f 100644 --- a/data/web/inc/lib/vendor/composer/InstalledVersions.php +++ b/data/web/inc/lib/vendor/composer/InstalledVersions.php @@ -20,12 +20,25 @@ use Composer\Semver\VersionParser; * * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * - * To require it's presence, you can require `composer-runtime-api ^2.0` + * To require its presence, you can require `composer-runtime-api ^2.0` */ class InstalledVersions { + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null + */ private static $installed; + + /** + * @var bool|null + */ private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ private static $installedByVendor = array(); /** @@ -228,7 +241,7 @@ class InstalledVersions /** * @return array - * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string} + * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} */ public static function getRootPackage() { @@ -242,7 +255,7 @@ class InstalledVersions * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] - * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array} + * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} */ public static function getRawData() { @@ -265,7 +278,7 @@ class InstalledVersions * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ public static function getAllRawData() { @@ -288,7 +301,7 @@ class InstalledVersions * @param array[] $data A vendor/composer/installed.php data set * @return void * - * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array} $data + * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data */ public static function reload($data) { @@ -298,7 +311,7 @@ class InstalledVersions /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { diff --git a/data/web/inc/lib/vendor/composer/autoload_files.php b/data/web/inc/lib/vendor/composer/autoload_files.php index 183b68df..02f24c12 100644 --- a/data/web/inc/lib/vendor/composer/autoload_files.php +++ b/data/web/inc/lib/vendor/composer/autoload_files.php @@ -7,10 +7,9 @@ $baseDir = dirname($vendorDir); return array( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', - 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', - '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', - 'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php', '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', + 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', + 'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php', '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', 'fe62ba7e10580d903cc46d808b5961a4' => $vendorDir . '/tightenco/collect/src/Collect/Support/helpers.php', 'caf31cc6ec7cf2241cb6f12c226c3846' => $vendorDir . '/tightenco/collect/src/Collect/Support/alias.php', diff --git a/data/web/inc/lib/vendor/composer/autoload_psr4.php b/data/web/inc/lib/vendor/composer/autoload_psr4.php index 6e9d44e1..f75b7fa7 100644 --- a/data/web/inc/lib/vendor/composer/autoload_psr4.php +++ b/data/web/inc/lib/vendor/composer/autoload_psr4.php @@ -16,7 +16,7 @@ return array( 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), 'RobThree\\Auth\\' => array($vendorDir . '/robthree/twofactorauth/lib'), 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), - 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), + 'Psr\\Log\\' => array($vendorDir . '/psr/log/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 'PhpMimeMailParser\\' => array($vendorDir . '/php-mime-mail-parser/php-mime-mail-parser/src'), 'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'), diff --git a/data/web/inc/lib/vendor/composer/autoload_real.php b/data/web/inc/lib/vendor/composer/autoload_real.php index 8a7686a4..250af557 100644 --- a/data/web/inc/lib/vendor/composer/autoload_real.php +++ b/data/web/inc/lib/vendor/composer/autoload_real.php @@ -65,11 +65,16 @@ class ComposerAutoloaderInit873464e4bd965a3168f133248b1b218b } } +/** + * @param string $fileIdentifier + * @param string $file + * @return void + */ function composerRequire873464e4bd965a3168f133248b1b218b($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - require $file; - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; } } diff --git a/data/web/inc/lib/vendor/composer/autoload_static.php b/data/web/inc/lib/vendor/composer/autoload_static.php index 19aadb61..bdd03180 100644 --- a/data/web/inc/lib/vendor/composer/autoload_static.php +++ b/data/web/inc/lib/vendor/composer/autoload_static.php @@ -8,10 +8,9 @@ class ComposerStaticInit873464e4bd965a3168f133248b1b218b { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', - 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', - '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', - 'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', + 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', + 'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php', '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', 'fe62ba7e10580d903cc46d808b5961a4' => __DIR__ . '/..' . '/tightenco/collect/src/Collect/Support/helpers.php', 'caf31cc6ec7cf2241cb6f12c226c3846' => __DIR__ . '/..' . '/tightenco/collect/src/Collect/Support/alias.php', @@ -115,7 +114,7 @@ class ComposerStaticInit873464e4bd965a3168f133248b1b218b ), 'Psr\\Log\\' => array ( - 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', + 0 => __DIR__ . '/..' . '/psr/log/src', ), 'Psr\\Container\\' => array ( diff --git a/data/web/inc/lib/vendor/composer/installed.json b/data/web/inc/lib/vendor/composer/installed.json index c5247040..a5cfe0e6 100644 --- a/data/web/inc/lib/vendor/composer/installed.json +++ b/data/web/inc/lib/vendor/composer/installed.json @@ -63,34 +63,35 @@ }, { "name": "ddeboer/imap", - "version": "1.12.1", - "version_normalized": "1.12.1.0", + "version": "1.13.1", + "version_normalized": "1.13.1.0", "source": { "type": "git", "url": "https://github.com/ddeboer/imap.git", - "reference": "dbed05ca67b93509345a820b2859de10c48948fb" + "reference": "8b772d04b1deadb5df13782fb78c4b648f77496e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ddeboer/imap/zipball/dbed05ca67b93509345a820b2859de10c48948fb", - "reference": "dbed05ca67b93509345a820b2859de10c48948fb", + "url": "https://api.github.com/repos/ddeboer/imap/zipball/8b772d04b1deadb5df13782fb78c4b648f77496e", + "reference": "8b772d04b1deadb5df13782fb78c4b648f77496e", "shasum": "" }, "require": { "ext-iconv": "*", "ext-imap": "*", "ext-mbstring": "*", - "php": "^7.4 || ^8.0" + "php": "^8.0.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18.6", - "laminas/laminas-mail": "^2.14.0", - "phpstan/phpstan": "^0.12.84", - "phpstan/phpstan-phpunit": "^0.12.18", - "phpstan/phpstan-strict-rules": "^0.12.9", - "phpunit/phpunit": "^9.5.4" + "friendsofphp/php-cs-fixer": "^v3.4.0", + "laminas/laminas-mail": "^2.15.1", + "malukenho/mcbumpface": "^1.1.5", + "phpstan/phpstan": "^1.3.3", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.5.11" }, - "time": "2021-04-27T08:38:46+00:00", + "time": "2022-01-10T10:53:05+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -124,7 +125,7 @@ ], "support": { "issues": "https://github.com/ddeboer/imap/issues", - "source": "https://github.com/ddeboer/imap/tree/1.12.1" + "source": "https://github.com/ddeboer/imap/tree/1.13.1" }, "funding": [ { @@ -140,35 +141,35 @@ }, { "name": "directorytree/ldaprecord", - "version": "v2.6.3", - "version_normalized": "2.6.3.0", + "version": "v2.10.1", + "version_normalized": "2.10.1.0", "source": { "type": "git", "url": "https://github.com/DirectoryTree/LdapRecord.git", - "reference": "5c93ec6d1ef458290825a8b0a148946dce7c1e7a" + "reference": "bf512d9af7a7b0e2ed7a666ab29cefdd027bee88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/5c93ec6d1ef458290825a8b0a148946dce7c1e7a", - "reference": "5c93ec6d1ef458290825a8b0a148946dce7c1e7a", + "url": "https://api.github.com/repos/DirectoryTree/LdapRecord/zipball/bf512d9af7a7b0e2ed7a666ab29cefdd027bee88", + "reference": "bf512d9af7a7b0e2ed7a666ab29cefdd027bee88", "shasum": "" }, "require": { "ext-json": "*", "ext-ldap": "*", - "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0", + "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0", "nesbot/carbon": "^1.0|^2.0", "php": ">=7.3", - "psr/log": "^1.0", - "psr/simple-cache": "^1.0", + "psr/log": "*", + "psr/simple-cache": "^1.0|^2.0", "tightenco/collect": "^5.6|^6.0|^7.0|^8.0" }, "require-dev": { "mockery/mockery": "^1.0", - "phpunit/phpunit": "^8.0", + "phpunit/phpunit": "^9.0", "spatie/ray": "^1.24" }, - "time": "2021-08-05T21:52:43+00:00", + "time": "2022-02-25T16:00:51+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -216,29 +217,29 @@ }, { "name": "illuminate/contracts", - "version": "v8.53.1", - "version_normalized": "8.53.1.0", + "version": "v9.3.0", + "version_normalized": "9.3.0.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "504a34286a1b4c5421c43087d6bd4e176138f6fb" + "reference": "bf4b3c254c49d28157645d01e4883b5951b1e1d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/504a34286a1b4c5421c43087d6bd4e176138f6fb", - "reference": "504a34286a1b4c5421c43087d6bd4e176138f6fb", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/bf4b3c254c49d28157645d01e4883b5951b1e1d0", + "reference": "bf4b3c254c49d28157645d01e4883b5951b1e1d0", "shasum": "" }, "require": { - "php": "^7.3|^8.0", - "psr/container": "^1.0", - "psr/simple-cache": "^1.0" + "php": "^8.0.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/simple-cache": "^1.0|^2.0|^3.0" }, - "time": "2021-08-03T14:03:47+00:00", + "time": "2022-02-22T14:45:39+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "8.x-dev" + "dev-master": "9.x-dev" } }, "installation-source": "dist", @@ -453,17 +454,17 @@ }, { "name": "nesbot/carbon", - "version": "2.51.1", - "version_normalized": "2.51.1.0", + "version": "2.57.0", + "version_normalized": "2.57.0.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922" + "reference": "4a54375c21eea4811dbd1149fe6b246517554e78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922", - "reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a54375c21eea4811dbd1149fe6b246517554e78", + "reference": "4a54375c21eea4811dbd1149fe6b246517554e78", "shasum": "" }, "require": { @@ -471,19 +472,20 @@ "php": "^7.1.8 || ^8.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-php80": "^1.16", - "symfony/translation": "^3.4 || ^4.0 || ^5.0" + "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { + "doctrine/dbal": "^2.0 || ^3.0", "doctrine/orm": "^2.7", - "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.54", + "phpstan/phpstan": "^0.12.54 || ^1.0", "phpunit/phpunit": "^7.5.20 || ^8.5.14", "squizlabs/php_codesniffer": "^3.4" }, - "time": "2021-07-28T13:16:28+00:00", + "time": "2022-02-13T18:13:33+00:00", "bin": [ "bin/carbon" ], @@ -533,6 +535,7 @@ "time" ], "support": { + "docs": "https://carbon.nesbot.com/docs", "issues": "https://github.com/briannesbitt/Carbon/issues", "source": "https://github.com/briannesbitt/Carbon" }, @@ -697,17 +700,17 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.5.0", - "version_normalized": "6.5.0.0", + "version": "v6.6.0", + "version_normalized": "6.6.0.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c" + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c", - "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1", + "reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1", "shasum": "" }, "require": { @@ -719,10 +722,12 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", + "php-parallel-lint/php-console-highlighter": "^0.5.0", + "php-parallel-lint/php-parallel-lint": "^1.3.1", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.5.6", - "yoast/phpunit-polyfills": "^0.2.0" + "squizlabs/php_codesniffer": "^3.6.2", + "yoast/phpunit-polyfills": "^1.0.0" }, "suggest": { "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", @@ -732,7 +737,7 @@ "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" }, - "time": "2021-06-16T14:33:43+00:00", + "time": "2022-02-28T15:31:21+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -764,7 +769,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0" }, "funding": [ { @@ -776,24 +781,29 @@ }, { "name": "psr/container", - "version": "1.1.1", - "version_normalized": "1.1.1.0", + "version": "2.0.2", + "version_normalized": "2.0.2.0", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, - "time": "2021-03-05T17:36:06+00:00", + "time": "2021-11-05T16:47:00+00:00", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "installation-source": "dist", "autoload": { "psr-4": { @@ -821,39 +831,39 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, "install-path": "../psr/container" }, { "name": "psr/log", - "version": "1.1.4", - "version_normalized": "1.1.4.0", + "version": "3.0.0", + "version_normalized": "3.0.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, - "time": "2021-05-03T11:20:27+00:00", + "time": "2021-07-14T16:46:02+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -874,33 +884,33 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, "install-path": "../psr/log" }, { "name": "psr/simple-cache", - "version": "1.0.1", - "version_normalized": "1.0.1.0", + "version": "2.0.0", + "version_normalized": "2.0.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/8707bf3cea6f710bf6ef05491234e3ab06f6432a", + "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, - "time": "2017-10-23T01:57:42+00:00", + "time": "2021-10-29T13:22:09+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "installation-source": "dist", @@ -916,7 +926,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -928,23 +938,23 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" + "source": "https://github.com/php-fig/simple-cache/tree/2.0.0" }, "install-path": "../psr/simple-cache" }, { "name": "robthree/twofactorauth", - "version": "1.8.0", - "version_normalized": "1.8.0.0", + "version": "1.8.1", + "version_normalized": "1.8.1.0", "source": { "type": "git", "url": "https://github.com/RobThree/TwoFactorAuth.git", - "reference": "30a38627ae1e7c9399dae67e265063cd6ec5276c" + "reference": "5afcb45282f1c75562a48d479ecd1732c9bdb11b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RobThree/TwoFactorAuth/zipball/30a38627ae1e7c9399dae67e265063cd6ec5276c", - "reference": "30a38627ae1e7c9399dae67e265063cd6ec5276c", + "url": "https://api.github.com/repos/RobThree/TwoFactorAuth/zipball/5afcb45282f1c75562a48d479ecd1732c9bdb11b", + "reference": "5afcb45282f1c75562a48d479ecd1732c9bdb11b", "shasum": "" }, "require": { @@ -958,7 +968,7 @@ "bacon/bacon-qr-code": "Needed for BaconQrCodeProvider provider", "endroid/qr-code": "Needed for EndroidQrCodeProvider" }, - "time": "2021-03-09T18:24:05+00:00", + "time": "2021-10-20T12:19:55+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1058,98 +1068,31 @@ ], "install-path": "../soundasleep/html2text" }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.4.0", - "version_normalized": "2.4.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "time": "2021-03-23T23:28:01+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "install-path": "../symfony/deprecation-contracts" - }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", - "version_normalized": "1.23.0.0", + "version": "v1.24.0", + "version_normalized": "1.24.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, - "time": "2021-02-19T12:13:01+00:00", + "time": "2021-10-20T20:35:02+00:00", "type": "library", "extra": { "branch-alias": { @@ -1162,12 +1105,12 @@ }, "installation-source": "dist", "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1192,7 +1135,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" }, "funding": [ { @@ -1212,26 +1155,29 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", - "version_normalized": "1.23.1.0", + "version": "v1.24.0", + "version_normalized": "1.24.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, - "time": "2021-05-27T12:26:48+00:00", + "time": "2021-11-30T18:21:41+00:00", "type": "library", "extra": { "branch-alias": { @@ -1244,12 +1190,12 @@ }, "installation-source": "dist", "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1275,7 +1221,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" }, "funding": [ { @@ -1295,23 +1241,23 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.23.1", - "version_normalized": "1.23.1.0", + "version": "v1.24.0", + "version_normalized": "1.24.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2021-07-28T13:41:28+00:00", + "time": "2021-09-13T13:58:33+00:00", "type": "library", "extra": { "branch-alias": { @@ -1324,12 +1270,12 @@ }, "installation-source": "dist", "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -1361,7 +1307,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" }, "funding": [ { @@ -1381,54 +1327,54 @@ }, { "name": "symfony/translation", - "version": "v5.3.4", - "version_normalized": "5.3.4.0", + "version": "v6.0.5", + "version_normalized": "6.0.5.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "d89ad7292932c2699cbe4af98d72c5c6bbc504c1" + "reference": "e69501c71107cc3146b32aaa45f4edd0c3427875" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/d89ad7292932c2699cbe4af98d72c5c6bbc504c1", - "reference": "d89ad7292932c2699cbe4af98d72c5c6bbc504c1", + "url": "https://api.github.com/repos/symfony/translation/zipball/e69501c71107cc3146b32aaa45f4edd0c3427875", + "reference": "e69501c71107cc3146b32aaa45f4edd0c3427875", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^2.3" + "symfony/translation-contracts": "^2.3|^3.0" }, "conflict": { - "symfony/config": "<4.4", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4" + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/twig-bundle": "<5.4", + "symfony/yaml": "<5.4" }, "provide": { - "symfony/translation-implementation": "2.3" + "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0", - "symfony/console": "^4.4|^5.0", - "symfony/dependency-injection": "^5.0", - "symfony/finder": "^4.4|^5.0", - "symfony/http-kernel": "^5.0", - "symfony/intl": "^4.4|^5.0", + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-client-contracts": "^1.1|^2.0|^3.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/intl": "^5.4|^6.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/service-contracts": "^1.1.2|^2", - "symfony/yaml": "^4.4|^5.0" + "symfony/service-contracts": "^1.1.2|^2|^3", + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", "symfony/config": "", "symfony/yaml": "" }, - "time": "2021-07-25T09:39:16+00:00", + "time": "2022-02-09T15:52:48+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1459,7 +1405,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.3.4" + "source": "https://github.com/symfony/translation/tree/v6.0.5" }, "funding": [ { @@ -1479,30 +1425,30 @@ }, { "name": "symfony/translation-contracts", - "version": "v2.4.0", - "version_normalized": "2.4.0.0", + "version": "v3.0.0", + "version_normalized": "3.0.0.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "95c812666f3e91db75385749fe219c5e494c7f95" + "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/95c812666f3e91db75385749fe219c5e494c7f95", - "reference": "95c812666f3e91db75385749fe219c5e494c7f95", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/1b6ea5a7442af5a12dba3dbd6d71034b5b234e77", + "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=8.0.2" }, "suggest": { "symfony/translation-implementation": "" }, - "time": "2021-03-23T23:28:01+00:00", + "time": "2021-09-07T12:43:40+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -1540,7 +1486,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.0.0" }, "funding": [ { @@ -1560,32 +1506,32 @@ }, { "name": "symfony/var-dumper", - "version": "v5.3.6", - "version_normalized": "5.3.6.0", + "version": "v6.0.5", + "version_normalized": "6.0.5.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0" + "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0", - "reference": "3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/60d6a756d5f485df5e6e40b337334848f79f61ce", + "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4" + "symfony/console": "<5.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -1593,7 +1539,7 @@ "ext-intl": "To show region name in time zone dump", "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" }, - "time": "2021-07-27T01:56:02+00:00", + "time": "2022-02-21T17:15:17+00:00", "bin": [ "Resources/bin/var-dump-server" ], @@ -1631,7 +1577,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.3.6" + "source": "https://github.com/symfony/var-dumper/tree/v6.0.5" }, "funding": [ { @@ -1651,29 +1597,29 @@ }, { "name": "tightenco/collect", - "version": "v8.34.0", - "version_normalized": "8.34.0.0", + "version": "v8.83.2", + "version_normalized": "8.83.2.0", "source": { "type": "git", "url": "https://github.com/tighten/collect.git", - "reference": "b069783ab0c547bb894ebcf8e7f6024bb401f9d2" + "reference": "d9c66d586ec2d216d8a31283d73f8df1400cc722" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tighten/collect/zipball/b069783ab0c547bb894ebcf8e7f6024bb401f9d2", - "reference": "b069783ab0c547bb894ebcf8e7f6024bb401f9d2", + "url": "https://api.github.com/repos/tighten/collect/zipball/d9c66d586ec2d216d8a31283d73f8df1400cc722", + "reference": "d9c66d586ec2d216d8a31283d73f8df1400cc722", "shasum": "" }, "require": { - "php": "^7.2|^8.0", - "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0" + "php": "^7.3|^8.0", + "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { "mockery/mockery": "^1.0", "nesbot/carbon": "^2.23.0", "phpunit/phpunit": "^8.3" }, - "time": "2021-03-29T21:29:00+00:00", + "time": "2022-02-16T16:15:54+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1702,23 +1648,23 @@ ], "support": { "issues": "https://github.com/tighten/collect/issues", - "source": "https://github.com/tighten/collect/tree/v8.34.0" + "source": "https://github.com/tighten/collect/tree/v8.83.2" }, "install-path": "../tightenco/collect" }, { "name": "twig/twig", - "version": "v3.3.2", - "version_normalized": "3.3.2.0", + "version": "v3.3.8", + "version_normalized": "3.3.8.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "21578f00e83d4a82ecfa3d50752b609f13de6790" + "reference": "972d8604a92b7054828b539f2febb0211dd5945c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/21578f00e83d4a82ecfa3d50752b609f13de6790", - "reference": "21578f00e83d4a82ecfa3d50752b609f13de6790", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c", + "reference": "972d8604a92b7054828b539f2febb0211dd5945c", "shasum": "" }, "require": { @@ -1728,9 +1674,9 @@ }, "require-dev": { "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9" + "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" }, - "time": "2021-05-16T12:14:13+00:00", + "time": "2022-02-04T06:59:48+00:00", "type": "library", "extra": { "branch-alias": { @@ -1771,7 +1717,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.3.2" + "source": "https://github.com/twigphp/Twig/tree/v3.3.8" }, "funding": [ { diff --git a/data/web/inc/lib/vendor/composer/installed.php b/data/web/inc/lib/vendor/composer/installed.php index cc343e04..9230ba25 100644 --- a/data/web/inc/lib/vendor/composer/installed.php +++ b/data/web/inc/lib/vendor/composer/installed.php @@ -1,22 +1,22 @@ array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '1c2923a4ddd7f89b3cf38c9594db289b7dd756d3', + 'reference' => NULL, 'name' => '__root__', 'dev' => true, ), 'versions' => array( '__root__' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '1c2923a4ddd7f89b3cf38c9594db289b7dd756d3', + 'reference' => NULL, 'dev_requirement' => false, ), 'bshaffer/oauth2-server-php' => array( @@ -29,21 +29,21 @@ 'dev_requirement' => false, ), 'ddeboer/imap' => array( - 'pretty_version' => '1.12.1', - 'version' => '1.12.1.0', + 'pretty_version' => '1.13.1', + 'version' => '1.13.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../ddeboer/imap', 'aliases' => array(), - 'reference' => 'dbed05ca67b93509345a820b2859de10c48948fb', + 'reference' => '8b772d04b1deadb5df13782fb78c4b648f77496e', 'dev_requirement' => false, ), 'directorytree/ldaprecord' => array( - 'pretty_version' => 'v2.6.3', - 'version' => '2.6.3.0', + 'pretty_version' => 'v2.10.1', + 'version' => '2.10.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../directorytree/ldaprecord', 'aliases' => array(), - 'reference' => '5c93ec6d1ef458290825a8b0a148946dce7c1e7a', + 'reference' => 'bf512d9af7a7b0e2ed7a666ab29cefdd027bee88', 'dev_requirement' => false, ), 'exorus/php-mime-mail-parser' => array( @@ -53,12 +53,12 @@ ), ), 'illuminate/contracts' => array( - 'pretty_version' => 'v8.53.1', - 'version' => '8.53.1.0', + 'pretty_version' => 'v9.3.0', + 'version' => '9.3.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/contracts', 'aliases' => array(), - 'reference' => '504a34286a1b4c5421c43087d6bd4e176138f6fb', + 'reference' => 'bf4b3c254c49d28157645d01e4883b5951b1e1d0', 'dev_requirement' => false, ), 'matthiasmullie/minify' => array( @@ -95,12 +95,12 @@ 'dev_requirement' => false, ), 'nesbot/carbon' => array( - 'pretty_version' => '2.51.1', - 'version' => '2.51.1.0', + 'pretty_version' => '2.57.0', + 'version' => '2.57.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../nesbot/carbon', 'aliases' => array(), - 'reference' => '8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922', + 'reference' => '4a54375c21eea4811dbd1149fe6b246517554e78', 'dev_requirement' => false, ), 'paragonie/random_compat' => array( @@ -122,48 +122,48 @@ 'dev_requirement' => false, ), 'phpmailer/phpmailer' => array( - 'pretty_version' => 'v6.5.0', - 'version' => '6.5.0.0', + 'pretty_version' => 'v6.6.0', + 'version' => '6.6.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpmailer/phpmailer', 'aliases' => array(), - 'reference' => 'a5b5c43e50b7fba655f793ad27303cd74c57363c', + 'reference' => 'e43bac82edc26ca04b36143a48bde1c051cfd5b1', 'dev_requirement' => false, ), 'psr/container' => array( - 'pretty_version' => '1.1.1', - 'version' => '1.1.1.0', + 'pretty_version' => '2.0.2', + 'version' => '2.0.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), - 'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf', + 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'dev_requirement' => false, ), 'psr/log' => array( - 'pretty_version' => '1.1.4', - 'version' => '1.1.4.0', + 'pretty_version' => '3.0.0', + 'version' => '3.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), - 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', + 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', 'dev_requirement' => false, ), 'psr/simple-cache' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', + 'pretty_version' => '2.0.0', + 'version' => '2.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), - 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', + 'reference' => '8707bf3cea6f710bf6ef05491234e3ab06f6432a', 'dev_requirement' => false, ), 'robthree/twofactorauth' => array( - 'pretty_version' => '1.8.0', - 'version' => '1.8.0.0', + 'pretty_version' => '1.8.1', + 'version' => '1.8.1.0', 'type' => 'library', 'install_path' => __DIR__ . '/../robthree/twofactorauth', 'aliases' => array(), - 'reference' => '30a38627ae1e7c9399dae67e265063cd6ec5276c', + 'reference' => '5afcb45282f1c75562a48d479ecd1732c9bdb11b', 'dev_requirement' => false, ), 'soundasleep/html2text' => array( @@ -175,91 +175,82 @@ 'reference' => 'cdb89f6ffa2c4cc78f8ed9ea6ee0594a9133ccad', 'dev_requirement' => false, ), - 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v2.4.0', - 'version' => '2.4.0.0', - 'type' => 'library', - 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', - 'aliases' => array(), - 'reference' => '5f38c8804a9e97d23e0c8d63341088cd8a22d627', - 'dev_requirement' => false, - ), 'symfony/polyfill-ctype' => array( - 'pretty_version' => 'v1.23.0', - 'version' => '1.23.0.0', + 'pretty_version' => 'v1.24.0', + 'version' => '1.24.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), - 'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce', + 'reference' => '30885182c981ab175d4d034db0f6f469898070ab', 'dev_requirement' => false, ), 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.23.1', - 'version' => '1.23.1.0', + 'pretty_version' => 'v1.24.0', + 'version' => '1.24.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), - 'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6', + 'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825', 'dev_requirement' => false, ), 'symfony/polyfill-php80' => array( - 'pretty_version' => 'v1.23.1', - 'version' => '1.23.1.0', + 'pretty_version' => 'v1.24.0', + 'version' => '1.24.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), - 'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be', + 'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9', 'dev_requirement' => false, ), 'symfony/translation' => array( - 'pretty_version' => 'v5.3.4', - 'version' => '5.3.4.0', + 'pretty_version' => 'v6.0.5', + 'version' => '6.0.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), - 'reference' => 'd89ad7292932c2699cbe4af98d72c5c6bbc504c1', + 'reference' => 'e69501c71107cc3146b32aaa45f4edd0c3427875', 'dev_requirement' => false, ), 'symfony/translation-contracts' => array( - 'pretty_version' => 'v2.4.0', - 'version' => '2.4.0.0', + 'pretty_version' => 'v3.0.0', + 'version' => '3.0.0.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation-contracts', 'aliases' => array(), - 'reference' => '95c812666f3e91db75385749fe219c5e494c7f95', + 'reference' => '1b6ea5a7442af5a12dba3dbd6d71034b5b234e77', 'dev_requirement' => false, ), 'symfony/translation-implementation' => array( 'dev_requirement' => false, 'provided' => array( - 0 => '2.3', + 0 => '2.3|3.0', ), ), 'symfony/var-dumper' => array( - 'pretty_version' => 'v5.3.6', - 'version' => '5.3.6.0', + 'pretty_version' => 'v6.0.5', + 'version' => '6.0.5.0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-dumper', 'aliases' => array(), - 'reference' => '3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0', + 'reference' => '60d6a756d5f485df5e6e40b337334848f79f61ce', 'dev_requirement' => false, ), 'tightenco/collect' => array( - 'pretty_version' => 'v8.34.0', - 'version' => '8.34.0.0', + 'pretty_version' => 'v8.83.2', + 'version' => '8.83.2.0', 'type' => 'library', 'install_path' => __DIR__ . '/../tightenco/collect', 'aliases' => array(), - 'reference' => 'b069783ab0c547bb894ebcf8e7f6024bb401f9d2', + 'reference' => 'd9c66d586ec2d216d8a31283d73f8df1400cc722', 'dev_requirement' => false, ), 'twig/twig' => array( - 'pretty_version' => 'v3.3.2', - 'version' => '3.3.2.0', + 'pretty_version' => 'v3.3.8', + 'version' => '3.3.8.0', 'type' => 'library', 'install_path' => __DIR__ . '/../twig/twig', 'aliases' => array(), - 'reference' => '21578f00e83d4a82ecfa3d50752b609f13de6790', + 'reference' => '972d8604a92b7054828b539f2febb0211dd5945c', 'dev_requirement' => false, ), 'yubico/u2flib-server' => array( diff --git a/data/web/inc/lib/vendor/composer/platform_check.php b/data/web/inc/lib/vendor/composer/platform_check.php index 580fa960..b168ddd5 100644 --- a/data/web/inc/lib/vendor/composer/platform_check.php +++ b/data/web/inc/lib/vendor/composer/platform_check.php @@ -4,8 +4,8 @@ $issues = array(); -if (!(PHP_VERSION_ID >= 70400)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; +if (!(PHP_VERSION_ID >= 80002)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.2". You are running ' . PHP_VERSION . '.'; } if ($issues) { diff --git a/data/web/inc/lib/vendor/ddeboer/imap/.php-cs-fixer.php b/data/web/inc/lib/vendor/ddeboer/imap/.php-cs-fixer.php new file mode 100644 index 00000000..22b4ada2 --- /dev/null +++ b/data/web/inc/lib/vendor/ddeboer/imap/.php-cs-fixer.php @@ -0,0 +1,73 @@ +setRiskyAllowed(true) + ->setRules([ + '@DoctrineAnnotation' => true, + '@Symfony' => true, + '@Symfony:risky' => true, + '@PHPUnit75Migration:risky' => true, + '@PHP71Migration' => true, + '@PHP70Migration:risky' => true, // @TODO with next major version + 'align_multiline_comment' => ['comment_type' => 'all_multiline'], + 'array_indentation' => true, + 'array_syntax' => ['syntax' => 'short'], + 'binary_operator_spaces' => ['default' => 'align_single_space'], + 'blank_line_before_statement' => true, + 'class_definition' => ['single_item_single_line' => true], + 'compact_nullable_typehint' => true, + 'concat_space' => ['spacing' => 'one'], + 'echo_tag_syntax' => ['format' => 'long'], + 'error_suppression' => false, + 'escape_implicit_backslashes' => true, + 'explicit_indirect_variable' => true, + 'explicit_string_variable' => true, + 'fully_qualified_strict_types' => true, + 'heredoc_to_nowdoc' => true, + 'list_syntax' => ['syntax' => 'long'], + 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], + 'method_chaining_indentation' => true, + 'multiline_comment_opening_closing' => true, + 'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'], + 'native_constant_invocation' => true, + 'native_function_invocation' => ['include' => ['@internal']], + 'no_alternative_syntax' => true, + 'no_break_comment' => true, + 'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']], + 'no_null_property_initialization' => true, + 'no_php4_constructor' => true, + 'no_superfluous_elseif' => true, + 'no_unneeded_curly_braces' => true, + 'no_unneeded_final_method' => true, + 'no_unreachable_default_argument_value' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'ordered_imports' => true, + 'php_unit_method_casing' => true, + 'php_unit_set_up_tear_down_visibility' => true, + 'php_unit_strict' => true, + 'php_unit_test_annotation' => true, + 'php_unit_test_case_static_method_calls' => true, + 'php_unit_test_class_requires_covers' => false, + 'phpdoc_add_missing_param_annotation' => true, + 'phpdoc_order' => true, + 'phpdoc_order_by_value' => true, + 'phpdoc_types_order' => true, + 'random_api_migration' => true, + 'semicolon_after_instruction' => true, + 'simplified_null_return' => true, + 'single_line_comment_style' => true, + 'single_line_throw' => false, + 'space_after_semicolon' => true, + 'static_lambda' => true, + 'strict_comparison' => true, + 'string_line_ending' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__ . '/src') + ->in(__DIR__ . '/tests') + ) +; diff --git a/data/web/inc/lib/vendor/ddeboer/imap/composer.json b/data/web/inc/lib/vendor/ddeboer/imap/composer.json index 92b4a07f..0bcf72af 100644 --- a/data/web/inc/lib/vendor/ddeboer/imap/composer.json +++ b/data/web/inc/lib/vendor/ddeboer/imap/composer.json @@ -1,12 +1,12 @@ { "name": "ddeboer/imap", "description": "Object-oriented IMAP for PHP", + "license": "MIT", "keywords": [ "email", "mail", "imap" ], - "license": "MIT", "authors": [ { "name": "David de Boer", @@ -22,18 +22,19 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0.1", "ext-iconv": "*", "ext-imap": "*", "ext-mbstring": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18.6", - "laminas/laminas-mail": "^2.14.0", - "phpstan/phpstan": "^0.12.84", - "phpstan/phpstan-phpunit": "^0.12.18", - "phpstan/phpstan-strict-rules": "^0.12.9", - "phpunit/phpunit": "^9.5.4" + "friendsofphp/php-cs-fixer": "^v3.4.0", + "laminas/laminas-mail": "^2.15.1", + "malukenho/mcbumpface": "^1.1.5", + "phpstan/phpstan": "^1.3.3", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.5.11" }, "autoload": { "psr-4": { @@ -44,5 +45,10 @@ "psr-4": { "Ddeboer\\Imap\\Tests\\": "tests/" } + }, + "config": { + "allow-plugins": { + "malukenho/mcbumpface": true + } } } diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Connection.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Connection.php index d9f2bb68..9f5ef90f 100644 --- a/data/web/inc/lib/vendor/ddeboer/imap/src/Connection.php +++ b/data/web/inc/lib/vendor/ddeboer/imap/src/Connection.php @@ -117,6 +117,7 @@ final class Connection implements ConnectionInterface return new Mailbox($this->resource, $name, $this->mailboxNames[$name]); } + #[\ReturnTypeWillChange] public function count() { $return = \imap_num_msg($this->resource->getStream()); diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/ImapResource.php b/data/web/inc/lib/vendor/ddeboer/imap/src/ImapResource.php index 123ea239..60d348a9 100644 --- a/data/web/inc/lib/vendor/ddeboer/imap/src/ImapResource.php +++ b/data/web/inc/lib/vendor/ddeboer/imap/src/ImapResource.php @@ -6,6 +6,7 @@ namespace Ddeboer\Imap; use Ddeboer\Imap\Exception\InvalidResourceException; use Ddeboer\Imap\Exception\ReopenMailboxException; +use IMAP\Connection; /** * An imap resource stream. @@ -22,7 +23,7 @@ final class ImapResource implements ImapResourceInterface /** * Constructor. * - * @param resource $resource + * @param Connection|resource $resource */ public function __construct($resource, MailboxInterface $mailbox = null) { @@ -32,7 +33,10 @@ final class ImapResource implements ImapResourceInterface public function getStream() { - if (false === \is_resource($this->resource) || 'imap' !== \get_resource_type($this->resource)) { + if ( + !$this->resource instanceof Connection + && (false === \is_resource($this->resource) || 'imap' !== \get_resource_type($this->resource)) + ) { throw new InvalidResourceException('Supplied resource is not a valid imap resource'); } @@ -55,8 +59,14 @@ final class ImapResource implements ImapResourceInterface return; } + \set_error_handler(static function (): bool { + return true; + }); + \imap_reopen($this->resource, $this->mailbox->getFullEncodedName()); + \restore_error_handler(); + if (self::isMailboxOpen($this->mailbox, $this->resource)) { return; } diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Mailbox.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Mailbox.php index 2f77799f..38823fee 100644 --- a/data/web/inc/lib/vendor/ddeboer/imap/src/Mailbox.php +++ b/data/web/inc/lib/vendor/ddeboer/imap/src/Mailbox.php @@ -64,6 +64,7 @@ final class Mailbox implements MailboxInterface return $this->info->delimiter; } + #[\ReturnTypeWillChange] public function count() { $return = \imap_num_msg($this->resource->getStream()); diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractPart.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractPart.php index 0ab0ca58..0647133c 100644 --- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractPart.php +++ b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractPart.php @@ -268,6 +268,7 @@ abstract class AbstractPart implements PartInterface * * @return mixed */ + #[\ReturnTypeWillChange] final public function current() { $this->lazyParseStructure(); @@ -275,11 +276,13 @@ abstract class AbstractPart implements PartInterface return $this->parts[$this->key]; } + #[\ReturnTypeWillChange] final public function getChildren() { return $this->current(); } + #[\ReturnTypeWillChange] final public function hasChildren() { $this->lazyParseStructure(); @@ -290,21 +293,25 @@ abstract class AbstractPart implements PartInterface /** * @return int */ + #[\ReturnTypeWillChange] final public function key() { return $this->key; } + #[\ReturnTypeWillChange] final public function next() { ++$this->key; } + #[\ReturnTypeWillChange] final public function rewind() { $this->key = 0; } + #[\ReturnTypeWillChange] final public function valid() { $this->lazyParseStructure(); diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php index 9f60fb14..4833487d 100644 --- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php +++ b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php @@ -19,6 +19,7 @@ final class EmailAddress $this->mailbox = $mailbox; $this->hostname = $hostname; $this->name = $name; + $this->address = null; if (null !== $hostname) { $this->address = $mailbox . '@' . $hostname; diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/MessageIteratorInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/MessageIteratorInterface.php index 36a79438..736084b1 100644 --- a/data/web/inc/lib/vendor/ddeboer/imap/src/MessageIteratorInterface.php +++ b/data/web/inc/lib/vendor/ddeboer/imap/src/MessageIteratorInterface.php @@ -9,7 +9,7 @@ use Ddeboer\Imap\Message\PartInterface; /** * @extends \Iterator */ -interface MessageIteratorInterface extends \Iterator +interface MessageIteratorInterface extends \Iterator, \Countable { /** * Get current message. diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/.github/workflows/run-tests.yml b/data/web/inc/lib/vendor/directorytree/ldaprecord/.github/workflows/run-tests.yml index ba002183..8c7b5314 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/.github/workflows/run-tests.yml +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/.github/workflows/run-tests.yml @@ -13,7 +13,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - php: [8.0, 7.4, 7.3] + php: [8.1, 8.0, 7.4, 7.3] name: ${{ matrix.os }} - P${{ matrix.php }} @@ -39,3 +39,40 @@ jobs: - name: Execute tests run: vendor/bin/phpunit + + run-analysis: + runs-on: ${{ matrix.os }} + name: Static code analysis (PHP ${{ matrix.php }}) + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + php: [8.0] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ~/.composer/cache/files + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: ldap, json + coverage: none + tools: psalm + + - name: Validate composer.json + run: composer validate + + - name: Install dependencies + run: composer update --prefer-dist --no-interaction + + - name: Run Psalm + run: psalm diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/.gitignore b/data/web/inc/lib/vendor/directorytree/ldaprecord/.gitignore index d5389fd6..e288894f 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/.gitignore +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/.gitignore @@ -1,5 +1,6 @@ vendor composer.lock +psalm.phar .php_cs.cache .phpunit.result.cache .php-cs-fixer.cache \ No newline at end of file diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/.styleci.yml b/data/web/inc/lib/vendor/directorytree/ldaprecord/.styleci.yml index c7740212..9f5e38cf 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/.styleci.yml +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/.styleci.yml @@ -1,4 +1,8 @@ preset: laravel enabled: - phpdoc_align + - phpdoc_separation - unalign_double_arrow +disabled: + - laravel_phpdoc_alignment + - laravel_phpdoc_separation diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/composer.json b/data/web/inc/lib/vendor/directorytree/ldaprecord/composer.json index 2e995d9d..35c60576 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/composer.json +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/composer.json @@ -32,19 +32,21 @@ "php": ">=7.3", "ext-ldap": "*", "ext-json": "*", - "psr/log": "^1.0", - "psr/simple-cache": "^1.0", + "psr/log": "*", + "psr/simple-cache": "^1.0|^2.0", "nesbot/carbon": "^1.0|^2.0", "tightenco/collect": "^5.6|^6.0|^7.0|^8.0", - "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0" + "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0" }, "require-dev": { - "phpunit/phpunit": "^8.0", + "phpunit/phpunit": "^9.0", "mockery/mockery": "^1.0", "spatie/ray": "^1.24" }, "archive": { - "exclude": ["/tests"] + "exclude": [ + "/tests" + ] }, "autoload": { "psr-4": { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/readme.md b/data/web/inc/lib/vendor/directorytree/ldaprecord/readme.md index 08ecd9e7..505d6992 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/readme.md +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/readme.md @@ -92,3 +92,13 @@ We've all been there -- accidentally deleting a user or group in Active Director

If you discover a security vulnerability within LdapRecord, please send an e-mail to Steve Bauman via steven_bauman@outlook.com.

All security vulnerabilities will be promptly addressed.

+ +--- + +

Credits

+ +

This package is directly inspired from Laravel's Eloquent, and most features are direct ports to an LDAP equivalent.

+ +

I am forever grateful for the work Taylor Otwell has produced.

+ +

If you can, support his work by purchasing a sponsorship, or one of his many Laravel based services.

diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Auth/Guard.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Auth/Guard.php index 696cc40d..d41af156 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Auth/Guard.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Auth/Guard.php @@ -54,10 +54,10 @@ class Guard * @param string $password * @param bool $stayBound * + * @return bool + * * @throws UsernameRequiredException * @throws PasswordRequiredException - * - * @return bool */ public function attempt($username, $password, $stayBound = false) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Configuration/DomainConfiguration.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Configuration/DomainConfiguration.php index 1dcdd1a1..d1124bfc 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Configuration/DomainConfiguration.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Configuration/DomainConfiguration.php @@ -124,9 +124,9 @@ class DomainConfiguration * * @param string $key * - * @throws ConfigurationException When the option specified does not exist. - * * @return mixed + * + * @throws ConfigurationException When the option specified does not exist. */ public function get($key) { @@ -155,9 +155,9 @@ class DomainConfiguration * @param string $key * @param mixed $value * - * @throws ConfigurationException When an option value given is an invalid type. - * * @return bool + * + * @throws ConfigurationException When an option value given is an invalid type. */ protected function validate($key, $value) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Configuration/Validators/Validator.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Configuration/Validators/Validator.php index 908a6395..de2f13f5 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Configuration/Validators/Validator.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Configuration/Validators/Validator.php @@ -49,9 +49,9 @@ abstract class Validator /** * Validate the configuration value. * - * @throws ConfigurationException - * * @return bool + * + * @throws ConfigurationException */ public function validate() { @@ -65,9 +65,9 @@ abstract class Validator /** * Throw a configuration exception. * - * @throws ConfigurationException - * * @return void + * + * @throws ConfigurationException */ protected function fail() { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Connection.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Connection.php index 8ba0ef1d..d429aa46 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Connection.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Connection.php @@ -111,9 +111,9 @@ class Connection * * @param array $config * - * @throws Configuration\ConfigurationException - * * @return $this + * + * @throws Configuration\ConfigurationException */ public function setConfiguration($config = []) { @@ -241,10 +241,10 @@ class Connection * @param string|null $username * @param string|null $password * + * @return Connection + * * @throws Auth\BindException * @throws LdapRecordException - * - * @return Connection */ public function connect($username = null, $password = null) { @@ -274,10 +274,10 @@ class Connection /** * Reconnect to the LDAP server. * + * @return void + * * @throws Auth\BindException * @throws ConnectionException - * - * @return void */ public function reconnect() { @@ -385,9 +385,9 @@ class Connection * * @param Closure $operation * - * @throws LdapRecordException - * * @return mixed + * + * @throws LdapRecordException */ protected function runOperationCallback(Closure $operation) { @@ -442,9 +442,9 @@ class Connection * @param LdapRecordException $e * @param Closure $operation * - * @throws LdapRecordException - * * @return mixed + * + * @throws LdapRecordException */ protected function tryAgainIfCausedByLostConnection(LdapRecordException $e, Closure $operation) { @@ -463,9 +463,9 @@ class Connection * * @param Closure $operation * - * @throws LdapRecordException - * * @return mixed + * + * @throws LdapRecordException */ protected function retry(Closure $operation) { @@ -486,9 +486,9 @@ class Connection * @param LdapRecordException $e * @param Closure $operation * - * @throws LdapRecordException - * * @return mixed + * + * @throws LdapRecordException */ protected function retryOnNextHost(LdapRecordException $e, Closure $operation) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/ConnectionManager.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/ConnectionManager.php index 0eacbc3f..01b072b4 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/ConnectionManager.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/ConnectionManager.php @@ -149,9 +149,9 @@ class ConnectionManager * * @param string|null $name * - * @throws ContainerException If the given connection does not exist. - * * @return Connection + * + * @throws ContainerException If the given connection does not exist. */ public function get($name = null) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Events/Logger.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Events/Logger.php index f3840c28..b2082e59 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Events/Logger.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Events/Logger.php @@ -39,11 +39,14 @@ class Logger { switch (true) { case $event instanceof AuthEvent: - return $this->auth($event); + $this->auth($event); + break; case $event instanceof ModelEvent: - return $this->model($event); + $this->model($event); + break; case $event instanceof QueryEvent: - return $this->query($event); + $this->query($event); + break; } } diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Events/NullDispatcher.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Events/NullDispatcher.php new file mode 100644 index 00000000..73b1f5a8 --- /dev/null +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Events/NullDispatcher.php @@ -0,0 +1,113 @@ +dispatcher = $dispatcher; + } + + /** + * Register an event listener with the dispatcher. + * + * @param string|array $events + * @param mixed $listener + * + * @return void + */ + public function listen($events, $listener) + { + $this->dispatcher->listen($events, $listener); + } + + /** + * Determine if a given event has listeners. + * + * @param string $eventName + * + * @return bool + */ + public function hasListeners($eventName) + { + return $this->dispatcher->hasListeners($eventName); + } + + /** + * Fire an event until the first non-null response is returned. + * + * @param string|object $event + * @param mixed $payload + * + * @return null + */ + public function until($event, $payload = []) + { + return null; + } + + /** + * Fire an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @param bool $halt + * + * @return null + */ + public function fire($event, $payload = [], $halt = false) + { + return null; + } + + /** + * Fire an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @param bool $halt + * + * @return null + */ + public function dispatch($event, $payload = [], $halt = false) + { + return null; + } + + /** + * Get all of the listeners for a given event name. + * + * @param string $eventName + * + * @return array + */ + public function getListeners($eventName) + { + return $this->dispatcher->getListeners($eventName); + } + + /** + * Remove a set of listeners from the dispatcher. + * + * @param string $event + * + * @return void + */ + public function forget($event) + { + $this->dispatcher->forget($event); + } +} diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/HandlesConnection.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/HandlesConnection.php index 41334b68..9af7ad75 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/HandlesConnection.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/HandlesConnection.php @@ -150,19 +150,21 @@ trait HandlesConnection * * @param Closure $operation * - * @throws LdapRecordException - * * @return mixed + * + * @throws LdapRecordException */ protected function executeFailableOperation(Closure $operation) { // If some older versions of PHP, errors are reported instead of throwing - // exceptions, which could be a signifcant detriment to our application. + // exceptions, which could be a significant detriment to our application. // Here, we will enforce these operations to throw exceptions instead. - set_error_handler(function ($severity, $message, $file, $line) { + set_error_handler(function (int $severity, string $message, string $file, int $line): bool { if (! $this->shouldBypassError($message)) { throw new ErrorException($message, $severity, $severity, $file, $line); } + + return true; }); try { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Ldap.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Ldap.php index 6503cead..0c3574f1 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Ldap.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Ldap.php @@ -2,6 +2,9 @@ namespace LdapRecord; +use LDAP\Connection as RawLdapConnection; + +/** @psalm-suppress UndefinedClass */ class Ldap implements LdapInterface { use HandlesConnection, DetectsErrors; @@ -104,7 +107,7 @@ class Ldap implements LdapInterface public function getLastError() { if (! $this->connection) { - return; + return null; } return ldap_error($this->connection); @@ -116,7 +119,7 @@ class Ldap implements LdapInterface public function getDetailedError() { if (! $number = $this->errNo()) { - return; + return null; } $this->getOption(LDAP_OPT_DIAGNOSTIC_MESSAGE, $message); @@ -202,7 +205,9 @@ class Ldap implements LdapInterface */ public function close() { - $result = is_resource($this->connection) ? @ldap_close($this->connection) : false; + $result = (is_resource($this->connection) || $this->connection instanceof RawLdapConnection) + ? @ldap_close($this->connection) + : false; $this->connection = null; $this->bound = false; @@ -214,7 +219,7 @@ class Ldap implements LdapInterface /** * @inheritdoc */ - public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) + public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []) { return $this->executeFailableOperation(function () use ( $dn, @@ -235,7 +240,7 @@ class Ldap implements LdapInterface /** * @inheritdoc */ - public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) + public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []) { return $this->executeFailableOperation(function () use ( $dn, @@ -256,7 +261,7 @@ class Ldap implements LdapInterface /** * @inheritdoc */ - public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) + public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []) { return $this->executeFailableOperation(function () use ( $dn, diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/LdapInterface.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/LdapInterface.php index a1773add..c74fe4e8 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/LdapInterface.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/LdapInterface.php @@ -156,7 +156,7 @@ interface LdapInterface /** * Return detailed information about an error. * - * Returns false when there was a successful last request. + * Returns null when there was a successful last request. * * Returns DetailedError when there was an error. * @@ -202,9 +202,9 @@ interface LdapInterface * * @see http://php.net/manual/en/function.ldap-start-tls.php * - * @throws LdapRecordException - * * @return bool + * + * @throws LdapRecordException */ public function startTLS(); @@ -247,7 +247,7 @@ interface LdapInterface * * @return resource */ - public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []); + public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []); /** * Performs a single level search on the current connection. @@ -265,7 +265,7 @@ interface LdapInterface * * @return resource */ - public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []); + public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []); /** * Reads an entry on the current connection. @@ -283,7 +283,7 @@ interface LdapInterface * * @return resource */ - public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []); + public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []); /** * Extract information from an LDAP result. @@ -292,10 +292,10 @@ interface LdapInterface * * @param resource $result * @param int $errorCode - * @param string $dn - * @param string $errorMessage - * @param array $referrals - * @param array $serverControls + * @param ?string $dn + * @param ?string $errorMessage + * @param ?array $referrals + * @param ?array $serverControls * * @return bool */ @@ -310,9 +310,9 @@ interface LdapInterface * @param string $username * @param string $password * - * @throws LdapRecordException - * * @return bool + * + * @throws LdapRecordException */ public function bind($username, $password); @@ -324,9 +324,9 @@ interface LdapInterface * @param string $dn * @param array $entry * - * @throws LdapRecordException - * * @return bool + * + * @throws LdapRecordException */ public function add($dn, array $entry); @@ -337,9 +337,9 @@ interface LdapInterface * * @param string $dn * - * @throws LdapRecordException - * * @return bool + * + * @throws LdapRecordException */ public function delete($dn); @@ -353,9 +353,9 @@ interface LdapInterface * @param string $newParent * @param bool $deleteOldRdn * - * @throws LdapRecordException - * * @return bool + * + * @throws LdapRecordException */ public function rename($dn, $newRdn, $newParent, $deleteOldRdn = false); @@ -367,9 +367,9 @@ interface LdapInterface * @param string $dn * @param array $entry * - * @throws LdapRecordException - * * @return bool + * + * @throws LdapRecordException */ public function modify($dn, array $entry); @@ -381,9 +381,9 @@ interface LdapInterface * @param string $dn * @param array $values * - * @throws LdapRecordException - * * @return bool + * + * @throws LdapRecordException */ public function modifyBatch($dn, array $values); @@ -395,9 +395,9 @@ interface LdapInterface * @param string $dn * @param array $entry * - * @throws LdapRecordException - * * @return bool + * + * @throws LdapRecordException */ public function modAdd($dn, array $entry); @@ -409,9 +409,9 @@ interface LdapInterface * @param string $dn * @param array $entry * - * @throws LdapRecordException - * * @return bool + * + * @throws LdapRecordException */ public function modReplace($dn, array $entry); @@ -423,9 +423,9 @@ interface LdapInterface * @param string $dn * @param array $entry * - * @throws LdapRecordException - * * @return bool + * + * @throws LdapRecordException */ public function modDelete($dn, array $entry); diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Entry.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Entry.php index 79a9d63d..652ad563 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Entry.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Entry.php @@ -78,7 +78,7 @@ class Entry extends BaseEntry implements ActiveDirectory */ public function isDeleted() { - return strtoupper($this->getFirstAttribute('isDeleted')) === 'TRUE'; + return strtoupper((string) $this->getFirstAttribute('isDeleted')) === 'TRUE'; } /** @@ -86,9 +86,9 @@ class Entry extends BaseEntry implements ActiveDirectory * * @param string|null $newParentDn * - * @throws \LdapRecord\LdapRecordException - * * @return bool + * + * @throws \LdapRecord\LdapRecordException */ public function restore($newParentDn = null) { @@ -109,10 +109,9 @@ class Entry extends BaseEntry implements ActiveDirectory } }); - $this->save([ - 'isDeleted' => null, - 'distinguishedName' => $newDn, - ]); + $this->setRawAttribute('distinguishedname', $newDn); + + $this->save(['isDeleted' => null]); } /** @@ -120,9 +119,9 @@ class Entry extends BaseEntry implements ActiveDirectory * * @param string|null $connection * - * @throws \LdapRecord\Models\ModelNotFoundException - * * @return static + * + * @throws \LdapRecord\Models\ModelNotFoundException */ public static function getRootDse($connection = null) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Group.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Group.php index 6076f2fd..78458877 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Group.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Group.php @@ -63,7 +63,7 @@ class Group extends Entry */ public function getRidAttribute() { - $objectSidComponents = explode('-', $this->getConvertedSid()); + $objectSidComponents = explode('-', (string) $this->getConvertedSid()); return [end($objectSidComponents)]; } diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Scopes/InConfigurationContext.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Scopes/InConfigurationContext.php index 2b1a177b..9f2fbe4d 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Scopes/InConfigurationContext.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/Scopes/InConfigurationContext.php @@ -15,9 +15,9 @@ class InConfigurationContext implements Scope * @param Builder $query * @param Model $model * - * @throws \LdapRecord\Models\ModelNotFoundException - * * @return void + * + * @throws \LdapRecord\Models\ModelNotFoundException */ public function apply(Builder $query, Model $model) { @@ -29,9 +29,9 @@ class InConfigurationContext implements Scope * * @param Model $model * - * @throws \LdapRecord\Models\ModelNotFoundException - * * @return mixed + * + * @throws \LdapRecord\Models\ModelNotFoundException */ protected function getConfigurationNamingContext(Model $model) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/User.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/User.php index 84dd74b7..b735b03b 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/User.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/ActiveDirectory/User.php @@ -2,6 +2,7 @@ namespace LdapRecord\Models\ActiveDirectory; +use Carbon\Carbon; use Illuminate\Contracts\Auth\Authenticatable; use LdapRecord\Models\ActiveDirectory\Concerns\HasPrimaryGroup; use LdapRecord\Models\ActiveDirectory\Scopes\RejectComputerObjectClass; @@ -117,4 +118,42 @@ class User extends Entry implements Authenticatable { return $query->whereHas('msExchMailboxGuid'); } + + /** + * Scopes the query to users having a lockout value set. + * + * @param Builder $query + * + * @return Builder + */ + public function scopeWhereHasLockout(Builder $query) + { + return $query->where('lockoutTime', '>=', 1); + } + + /** + * Determine if the user is locked out using the domains LockoutDuration group policy value. + * + * @see https://ldapwiki.com/wiki/Active%20Directory%20Account%20Lockout + * @see https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/account-lockout-duration + * + * @param string|int $localTimezone + * @param int|null $durationInMinutes + * + * @return bool + */ + public function isLockedOut($localTimezone, $durationInMinutes = null) + { + $time = $this->getFirstAttribute('lockouttime'); + + if (! $time instanceof Carbon) { + return false; + } + + is_int($localTimezone) + ? $time->addMinutes($localTimezone) + : $time->setTimezone($localTimezone)->addMinutes($durationInMinutes ?: 0); + + return ! $time->isPast(); + } } diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/AccountControl.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/AccountControl.php index 9c6240bc..7e241462 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/AccountControl.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/AccountControl.php @@ -53,14 +53,14 @@ class AccountControl /** * The account control flag values. * - * @var array + * @var array */ protected $values = []; /** * Constructor. * - * @param int $flag + * @param ?int $flag */ public function __construct($flag = null) { @@ -431,7 +431,7 @@ class AccountControl /** * Get the account control flag values. * - * @return array + * @return array */ public function getValues() { @@ -441,7 +441,7 @@ class AccountControl /** * Set the account control values. * - * @param array $flags + * @param array $flags * * @return void */ diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/DistinguishedName.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/DistinguishedName.php index c092173e..c6977a8e 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/DistinguishedName.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/DistinguishedName.php @@ -12,7 +12,7 @@ class DistinguishedName /** * The underlying raw value. * - * @var string|null + * @var string */ protected $value; @@ -23,7 +23,7 @@ class DistinguishedName */ public function __construct($value = null) { - $this->value = trim($value); + $this->value = trim((string) $value); } /** @@ -72,6 +72,18 @@ class DistinguishedName return new static($value); } + /** + * Determine if the given value is a valid distinguished name. + * + * @param string $value + * + * @return bool + */ + public static function isValid($value) + { + return ! static::make($value)->isEmpty(); + } + /** * Explode a distinguished name into relative distinguished names. * @@ -81,19 +93,19 @@ class DistinguishedName */ public static function explode($dn) { - $dn = ldap_explode_dn($dn, $withoutAttributes = false); + $components = ldap_explode_dn($dn, (int) $withoutAttributes = false); - if (! is_array($dn)) { + if (! is_array($components)) { return []; } - if (! array_key_exists('count', $dn)) { + if (! array_key_exists('count', $components)) { return []; } - unset($dn['count']); + unset($components['count']); - return $dn; + return $components; } /** @@ -310,6 +322,18 @@ class DistinguishedName return implode(',', $components) ?: null; } + /** + * Determine if the distinguished name is empty. + * + * @return bool + */ + public function isEmpty() + { + return empty( + array_filter($this->values()) + ); + } + /** * Determine if the current distinguished name is a parent of the given child. * diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/DistinguishedNameBuilder.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/DistinguishedNameBuilder.php index 83dfe716..601902bf 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/DistinguishedNameBuilder.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/DistinguishedNameBuilder.php @@ -236,7 +236,7 @@ class DistinguishedNameBuilder /** * Build the distinguished name from the components. * - * @return $this + * @return string */ protected function build() { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/EscapedValue.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/EscapedValue.php index cc04a67d..2f611129 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/EscapedValue.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/EscapedValue.php @@ -34,7 +34,7 @@ class EscapedValue */ public function __construct($value, $ignore = '', $flags = 0) { - $this->value = $value; + $this->value = (string) $value; $this->ignore = $ignore; $this->flags = $flags; } @@ -59,6 +59,16 @@ class EscapedValue return ldap_escape($this->value, $this->ignore, $this->flags); } + /** + * Get the raw (unescaped) value. + * + * @return mixed + */ + public function raw() + { + return $this->value; + } + /** * Set the characters to exclude from being escaped. * diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/Password.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/Password.php index 7f0b4128..644f0a8d 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/Password.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/Password.php @@ -244,9 +244,9 @@ class Password * * @param int $type * - * @throws InvalidArgumentException - * * @return array + * + * @throws InvalidArgumentException */ protected static function makeCryptPrefixAndLength($type) { @@ -297,9 +297,9 @@ class Password /** * Attempt to retrieve a salt from the encrypted password. * - * @throws LdapRecordException - * * @return string + * + * @throws LdapRecordException */ public static function getSalt($encryptedPassword) { @@ -321,9 +321,9 @@ class Password * * @param string $method * - * @throws \ReflectionException - * * @return bool + * + * @throws \ReflectionException */ public static function hashMethodRequiresSalt($method): bool { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/Timestamp.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/Timestamp.php index abd656c8..e5d9dc34 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/Timestamp.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Attributes/Timestamp.php @@ -61,9 +61,9 @@ class Timestamp * * @param mixed $value * - * @throws LdapRecordException - * * @return float|string + * + * @throws LdapRecordException */ public function fromDateTime($value) { @@ -121,9 +121,9 @@ class Timestamp * * @param mixed $value * - * @throws LdapRecordException - * * @return Carbon|false + * + * @throws LdapRecordException */ public function toDateTime($value) { @@ -155,7 +155,7 @@ class Timestamp * * @param string $value * - * @return DateTime|bool + * @return DateTime|false */ protected function convertLdapTimeToDateTime($value) { @@ -184,7 +184,7 @@ class Timestamp * * @param string $value * - * @return DateTime|bool + * @return DateTime|false */ protected function convertWindowsTimeToDateTime($value) { @@ -213,9 +213,9 @@ class Timestamp * * @param int $value * - * @throws \Exception + * @return DateTime|false * - * @return DateTime|bool + * @throws \Exception */ protected function convertWindowsIntegerTimeToDateTime($value) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/CanAuthenticate.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/CanAuthenticate.php index f287454e..451738ab 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/CanAuthenticate.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/CanAuthenticate.php @@ -31,6 +31,7 @@ trait CanAuthenticate */ public function getAuthPassword() { + return ''; } /** @@ -40,6 +41,7 @@ trait CanAuthenticate */ public function getRememberToken() { + return ''; } /** @@ -60,5 +62,6 @@ trait CanAuthenticate */ public function getRememberTokenName() { + return ''; } } diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasAttributes.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasAttributes.php index 20fcec02..b5f33357 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasAttributes.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasAttributes.php @@ -238,26 +238,28 @@ trait HasAttributes * Returns the models attribute by its key. * * @param int|string $key + * @param mixed $default * * @return mixed */ - public function getAttribute($key) + public function getAttribute($key, $default = null) { if (! $key) { return; } - return $this->getAttributeValue($key); + return $this->getAttributeValue($key, $default); } /** * Get an attributes value. * * @param string $key + * @param mixed $default * * @return mixed */ - public function getAttributeValue($key) + public function getAttributeValue($key, $default = null) { $key = $this->normalizeAttributeKey($key); $value = $this->getAttributeFromArray($key); @@ -274,7 +276,7 @@ trait HasAttributes return $this->castAttribute($key, $value); } - return $value; + return is_null($value) ? $default : $value; } /** @@ -311,9 +313,9 @@ trait HasAttributes * @param string $type * @param mixed $value * - * @throws LdapRecordException - * * @return float|string + * + * @throws LdapRecordException */ public function fromDateTime($type, $value) { @@ -326,9 +328,9 @@ trait HasAttributes * @param mixed $value * @param string $type * - * @throws LdapRecordException - * * @return Carbon|false + * + * @throws LdapRecordException */ public function asDateTime($value, $type) { @@ -686,13 +688,14 @@ trait HasAttributes * Returns the first attribute by the specified key. * * @param string $key + * @param mixed $default * * @return mixed */ - public function getFirstAttribute($key) + public function getFirstAttribute($key, $default = null) { return Arr::first( - Arr::wrap($this->getAttribute($key)) + Arr::wrap($this->getAttribute($key, $default)), ); } @@ -707,10 +710,10 @@ trait HasAttributes } /** - * Set an attribute value by the specified key and sub-key. + * Set an attribute value by the specified key. * - * @param mixed $key - * @param mixed $value + * @param string $key + * @param mixed $value * * @return $this */ @@ -737,6 +740,23 @@ trait HasAttributes return $this; } + /** + * Set an attribute on the model. No checking is done. + * + * @param string $key + * @param mixed $value + * + * @return $this + */ + public function setRawAttribute($key, $value) + { + $key = $this->normalizeAttributeKey($key); + + $this->attributes[$key] = Arr::wrap($value); + + return $this; + } + /** * Set the models first attribute value. * diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasEvents.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasEvents.php index 1bc76d09..5adec96e 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasEvents.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasEvents.php @@ -3,10 +3,39 @@ namespace LdapRecord\Models\Concerns; use Closure; +use LdapRecord\Events\NullDispatcher; use LdapRecord\Models\Events\Event; trait HasEvents { + /** + * Execute the callback without raising any events. + * + * @param Closure $callback + * + * @return mixed + */ + protected static function withoutEvents(Closure $callback) + { + $container = static::getConnectionContainer(); + + $dispatcher = $container->getEventDispatcher(); + + if ($dispatcher) { + $container->setEventDispatcher( + new NullDispatcher($dispatcher) + ); + } + + try { + return $callback(); + } finally { + if ($dispatcher) { + $container->setEventDispatcher($dispatcher); + } + } + } + /** * Fires the specified model event. * diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasGlobalScopes.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasGlobalScopes.php index c14abad2..f7552c1b 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasGlobalScopes.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasGlobalScopes.php @@ -14,9 +14,9 @@ trait HasGlobalScopes * @param Scope|Closure|string $scope * @param Closure|null $implementation * - * @throws InvalidArgumentException - * * @return mixed + * + * @throws InvalidArgumentException */ public static function addGlobalScope($scope, Closure $implementation = null) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasPassword.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasPassword.php index 98224566..1a938c14 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasPassword.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasPassword.php @@ -159,9 +159,9 @@ trait HasPassword * @param string $password * @param string $salt * - * @throws LdapRecordException - * * @return string + * + * @throws LdapRecordException */ protected function getHashedPassword($method, $password, $salt = null) { @@ -179,9 +179,9 @@ trait HasPassword /** * Validates that the current LDAP connection is secure. * - * @throws ConnectionException - * * @return void + * + * @throws ConnectionException */ protected function validateSecureConnection() { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Model.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Model.php index 6ba24b45..2e11696b 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Model.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Model.php @@ -3,6 +3,7 @@ namespace LdapRecord\Models; use ArrayAccess; +use Illuminate\Contracts\Support\Arrayable; use InvalidArgumentException; use JsonSerializable; use LdapRecord\Connection; @@ -17,7 +18,7 @@ use LdapRecord\Support\Arr; use UnexpectedValueException; /** @mixin Builder */ -abstract class Model implements ArrayAccess, JsonSerializable +abstract class Model implements ArrayAccess, Arrayable, JsonSerializable { use EscapesValues; use Concerns\HasEvents; @@ -28,7 +29,7 @@ abstract class Model implements ArrayAccess, JsonSerializable use Concerns\HasRelationships; /** - * Indicates if the model exists in the LDAP directory. + * Indicates if the model exists in the directory. * * @var bool */ @@ -63,7 +64,7 @@ abstract class Model implements ArrayAccess, JsonSerializable protected $in; /** - * The object classes of the LDAP model. + * The object classes of the model. * * @var array */ @@ -77,7 +78,7 @@ abstract class Model implements ArrayAccess, JsonSerializable protected static $container; /** - * The LDAP connection name for the model. + * The connection name for the model. * * @var string|null */ @@ -138,7 +139,7 @@ abstract class Model implements ArrayAccess, JsonSerializable } /** - * The "booting" method of the model. + * The "boot" method of the model. * * @return void */ @@ -204,7 +205,7 @@ abstract class Model implements ArrayAccess, JsonSerializable * * @param string $dn * - * @return static + * @return $this */ public function setDn($dn) { @@ -214,7 +215,31 @@ abstract class Model implements ArrayAccess, JsonSerializable } /** - * Get the LDAP connection for the model. + * A mutator for setting the models distinguished name. + * + * @param string $dn + * + * @return $this + */ + public function setDnAttribute($dn) + { + return $this->setRawAttribute('dn', $dn)->setDn($dn); + } + + /** + * A mutator for setting the models distinguished name. + * + * @param string $dn + * + * @return $this + */ + public function setDistinguishedNameAttribute($dn) + { + return $this->setRawAttribute('distinguishedname', $dn)->setDn($dn); + } + + /** + * Get the connection for the model. * * @return Connection */ @@ -275,6 +300,18 @@ abstract class Model implements ArrayAccess, JsonSerializable return static::query()->select($attributes)->paginate(); } + /** + * Make a new model instance. + * + * @param array $attributes + * + * @return static + */ + public static function make($attributes = []) + { + return new static($attributes); + } + /** * Begin querying the model. * @@ -501,6 +538,7 @@ abstract class Model implements ArrayAccess, JsonSerializable * * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return ! is_null($this->getAttribute($offset)); @@ -513,6 +551,7 @@ abstract class Model implements ArrayAccess, JsonSerializable * * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->getAttribute($offset); @@ -526,6 +565,7 @@ abstract class Model implements ArrayAccess, JsonSerializable * * @return void */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $this->setAttribute($offset, $value); @@ -538,6 +578,7 @@ abstract class Model implements ArrayAccess, JsonSerializable * * @return void */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->attributes[$offset]); @@ -568,15 +609,26 @@ abstract class Model implements ArrayAccess, JsonSerializable } /** - * Convert the object into something JSON serializable. + * Convert the model to its JSON encodeable array form. * * @return array */ - public function jsonSerialize() + public function toArray() { return $this->attributesToArray(); } + /** + * Convert the model's attributes into JSON encodeable values. + * + * @return array + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return $this->toArray(); + } + /** * Converts extra attributes for JSON serialization. * @@ -615,17 +667,31 @@ abstract class Model implements ArrayAccess, JsonSerializable /** * Determine if two models have the same distinguished name and belong to the same connection. * - * @param static $model + * @param Model|null $model * * @return bool */ - public function is(self $model) + public function is($model) { - return $this->dn == $model->getDn() && $this->getConnectionName() == $model->getConnectionName(); + return ! is_null($model) + && $this->dn == $model->getDn() + && $this->getConnectionName() == $model->getConnectionName(); } /** - * Hydrate a new collection of models from LDAP search results. + * Determine if two models are not the same. + * + * @param Model|null $model + * + * @return bool + */ + public function isNot($model) + { + return ! $this->is($model); + } + + /** + * Hydrate a new collection of models from search results. * * @param array $records * @@ -714,9 +780,9 @@ abstract class Model implements ArrayAccess, JsonSerializable * * @param array|BatchModification $mod * - * @throws InvalidArgumentException - * * @return $this + * + * @throws InvalidArgumentException */ public function addModification($mod = []) { @@ -818,7 +884,7 @@ abstract class Model implements ArrayAccess, JsonSerializable /** * Get the model's object GUID key. * - * @return void + * @return string */ public function getObjectGuidKey() { @@ -942,14 +1008,30 @@ abstract class Model implements ArrayAccess, JsonSerializable return $this; } + /** + * Save the model to the directory without raising any events. + * + * @param array $attributes + * + * @return void + * + * @throws \LdapRecord\LdapRecordException + */ + public function saveQuietly(array $attributes = []) + { + static::withoutEvents(function () use ($attributes) { + $this->save($attributes); + }); + } + /** * Save the model to the directory. * * @param array $attributes The attributes to update or create for the current entry. * - * @throws \LdapRecord\LdapRecordException - * * @return void + * + * @throws \LdapRecord\LdapRecordException */ public function save(array $attributes = []) { @@ -967,9 +1049,9 @@ abstract class Model implements ArrayAccess, JsonSerializable /** * Inserts the model into the directory. * - * @throws \LdapRecord\LdapRecordException - * * @return void + * + * @throws \LdapRecord\LdapRecordException */ protected function performInsert() { @@ -1009,9 +1091,9 @@ abstract class Model implements ArrayAccess, JsonSerializable /** * Updates the model in the directory. * - * @throws \LdapRecord\LdapRecordException - * * @return void + * + * @throws \LdapRecord\LdapRecordException */ protected function performUpdate() { @@ -1035,9 +1117,9 @@ abstract class Model implements ArrayAccess, JsonSerializable * * @param array $attributes The attributes for the new entry. * - * @throws \LdapRecord\LdapRecordException - * * @return Model + * + * @throws \LdapRecord\LdapRecordException */ public static function create(array $attributes = []) { @@ -1054,14 +1136,14 @@ abstract class Model implements ArrayAccess, JsonSerializable * @param string $attribute The attribute to create * @param mixed $value The value of the new attribute * + * @return void + * * @throws ModelDoesNotExistException * @throws \LdapRecord\LdapRecordException - * - * @return void */ public function createAttribute($attribute, $value) { - $this->validateExistence(); + $this->requireExistence(); $this->newQuery()->insertAttributes($this->dn, [$attribute => (array) $value]); @@ -1073,14 +1155,14 @@ abstract class Model implements ArrayAccess, JsonSerializable * * @param array $attributes The attributes to update for the current entry. * + * @return void + * * @throws ModelDoesNotExistException * @throws \LdapRecord\LdapRecordException - * - * @return void */ public function update(array $attributes = []) { - $this->validateExistence(); + $this->requireExistence(); $this->save($attributes); } @@ -1091,14 +1173,14 @@ abstract class Model implements ArrayAccess, JsonSerializable * @param string $attribute The attribute to modify * @param mixed $value The new value for the attribute * + * @return void + * * @throws ModelDoesNotExistException * @throws \LdapRecord\LdapRecordException - * - * @return void */ public function updateAttribute($attribute, $value) { - $this->validateExistence(); + $this->requireExistence(); $this->newQuery()->updateAttributes($this->dn, [$attribute => (array) $value]); @@ -1111,9 +1193,9 @@ abstract class Model implements ArrayAccess, JsonSerializable * @param Collection|array|string $dns * @param bool $recursive * - * @throws \LdapRecord\LdapRecordException - * * @return int + * + * @throws \LdapRecord\LdapRecordException */ public static function destroy($dns, $recursive = false) { @@ -1144,14 +1226,14 @@ abstract class Model implements ArrayAccess, JsonSerializable * * @param bool $recursive Whether to recursively delete leaf nodes (models that are children). * + * @return void + * * @throws ModelDoesNotExistException * @throws \LdapRecord\LdapRecordException - * - * @return void */ public function delete($recursive = false) { - $this->validateExistence(); + $this->requireExistence(); $this->fireModelEvent(new Events\Deleting($this)); @@ -1172,18 +1254,17 @@ abstract class Model implements ArrayAccess, JsonSerializable /** * Deletes leaf nodes that are attached to the model. * - * @throws \LdapRecord\LdapRecordException + * @return void * - * @return Collection + * @throws \LdapRecord\LdapRecordException */ protected function deleteLeafNodes() { - return $this->newQueryWithoutScopes() + $this->newQueryWithoutScopes() ->in($this->dn) ->listing() - ->paginate() - ->each(function (self $model) { - $model->delete($recursive = true); + ->chunk(250, function ($models) { + $models->each->delete($recursive = true); }); } @@ -1200,14 +1281,14 @@ abstract class Model implements ArrayAccess, JsonSerializable * * ["memberuid" => []] * + * @return void + * * @throws ModelDoesNotExistException * @throws \LdapRecord\LdapRecordException - * - * @return void */ public function deleteAttribute($attributes) { - $this->validateExistence(); + $this->requireExistence(); $attributes = $this->makeDeletableAttributes($attributes); @@ -1261,15 +1342,15 @@ abstract class Model implements ArrayAccess, JsonSerializable * @param static|string $newParentDn The new parent of the current model. * @param bool $deleteOldRdn Whether to delete the old models relative distinguished name once renamed / moved. * + * @return void + * * @throws UnexpectedValueException * @throws ModelDoesNotExistException * @throws \LdapRecord\LdapRecordException - * - * @return void */ public function move($newParentDn, $deleteOldRdn = true) { - $this->validateExistence(); + $this->requireExistence(); if (! $rdn = $this->getRdn()) { throw new UnexpectedValueException('Current model does not contain an RDN to move.'); @@ -1285,14 +1366,14 @@ abstract class Model implements ArrayAccess, JsonSerializable * @param static|string|null $newParentDn The models new parent distinguished name (if moving). Leave this null if you are only renaming. Example: "ou=MovedUsers,dc=acme,dc=org" * @param bool|true $deleteOldRdn Whether to delete the old models relative distinguished name once renamed / moved. * + * @return void + * * @throws ModelDoesNotExistException * @throws \LdapRecord\LdapRecordException - * - * @return void */ public function rename($rdn, $newParentDn = null, $deleteOldRdn = true) { - $this->validateExistence(); + $this->requireExistence(); if ($newParentDn instanceof self) { $newParentDn = $newParentDn->getDn(); @@ -1312,6 +1393,13 @@ abstract class Model implements ArrayAccess, JsonSerializable return; } + // If the RDN we have been given is empty when parsed, we must + // have been given a string, with no attribute. In this case, + // we will create a new RDN using the current DN's head. + if ($this->newDn($rdn)->isEmpty()) { + $rdn = $this->getUpdateableRdn($rdn); + } + $this->fireModelEvent(new Renaming($this, $rdn, $newParentDn)); $this->newQuery()->rename($this->dn, $rdn, $newParentDn, $deleteOldRdn); @@ -1337,6 +1425,18 @@ abstract class Model implements ArrayAccess, JsonSerializable $this->wasRecentlyRenamed = true; } + /** + * Get an updateable RDN for the model. + * + * @param string $name + * + * @return string + */ + public function getUpdateableRdn($name) + { + return $this->getCreatableRdn($name, $this->newDn($this->dn)->head()); + } + /** * Get a distinguished name that is creatable for the model. * @@ -1426,13 +1526,13 @@ abstract class Model implements ArrayAccess, JsonSerializable } /** - * Validates that the current model exists. - * - * @throws ModelDoesNotExistException + * Throw an exception if the model does not exist. * * @return void + * + * @throws ModelDoesNotExistException */ - protected function validateExistence() + protected function requireExistence() { if (! $this->exists || is_null($this->dn)) { throw ModelDoesNotExistException::forModel($this); diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/HasMany.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/HasMany.php index d8dfa08c..ae36720c 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/HasMany.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/HasMany.php @@ -284,9 +284,9 @@ class HasMany extends OneToMany * * @param string $model * - * @throws ModelNotFoundException - * * @return Model + * + * @throws ModelNotFoundException */ protected function getForeignModelByValueOrFail($model) { @@ -309,9 +309,9 @@ class HasMany extends OneToMany * @param string|array $bypass * @param mixed $value * - * @throws LdapRecordException - * * @return mixed + * + * @throws LdapRecordException */ protected function attemptFailableOperation($operation, $bypass, $value) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/HasOne.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/HasOne.php index 9a9b2f9b..7bad4ab6 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/HasOne.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/HasOne.php @@ -27,9 +27,9 @@ class HasOne extends Relation * * @param Model|string $model * - * @throws \LdapRecord\LdapRecordException - * * @return Model|string + * + * @throws \LdapRecord\LdapRecordException */ public function attach($model) { @@ -45,9 +45,9 @@ class HasOne extends Relation /** * Detach the related model from the parent. * - * @throws \LdapRecord\LdapRecordException - * * @return void + * + * @throws \LdapRecord\LdapRecordException */ public function detach() { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/OneToMany.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/OneToMany.php index d0a407cc..6d14c857 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/OneToMany.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Relations/OneToMany.php @@ -49,7 +49,7 @@ abstract class OneToMany extends Relation /** * Set the relation to load with its parent. * - * @param OneToMany $relation + * @param Relation $relation * * @return $this */ diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Builder.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Builder.php index c75afa2e..b9e31960 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Builder.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Builder.php @@ -6,6 +6,7 @@ use BadMethodCallException; use Closure; use DateTimeInterface; use InvalidArgumentException; +use LDAP\Result; use LdapRecord\Connection; use LdapRecord\Container; use LdapRecord\EscapesValues; @@ -19,6 +20,7 @@ use LdapRecord\Query\Pagination\Paginator; use LdapRecord\Support\Arr; use LdapRecord\Utilities; +/** @psalm-suppress UndefinedClass */ class Builder { use EscapesValues; @@ -48,6 +50,13 @@ class Builder */ public $controls = []; + /** + * The LDAP server controls that were processed. + * + * @var array + */ + public $controlsResponse = []; + /** * The size limit of the query. * @@ -238,12 +247,12 @@ class Builder * * After running the callback, the columns are reset to the original value. * - * @param array $columns - * @param callable $callback + * @param array $columns + * @param Closure $callback * * @return mixed */ - protected function onceWithColumns($columns, $callback) + protected function onceWithColumns($columns, Closure $callback) { $original = $this->columns; @@ -383,8 +392,8 @@ class Builder { return str_replace( '{base}', - $this->baseDn, - $dn instanceof Model ? $dn->getDn() : $dn + $this->baseDn ?: '', + (string) ($dn instanceof Model ? $dn->getDn() : $dn) ); } @@ -500,6 +509,25 @@ class Builder }); } + /** + * Execute a callback over each item while chunking. + * + * @param Closure $callback + * @param int $count + * + * @return bool + */ + public function each(Closure $callback, $count = 1000) + { + return $this->chunk($count, function ($results) use ($callback) { + foreach ($results as $key => $value) { + if ($callback($value, $key) === false) { + return false; + } + } + }); + } + /** * Chunk the results of a paginated LDAP query. * @@ -507,7 +535,7 @@ class Builder * @param Closure $callback * @param bool $isCritical * - * @return void + * @return bool */ public function chunk($pageSize, Closure $callback, $isCritical = false) { @@ -515,11 +543,19 @@ class Builder $query = $this->getQuery(); + $page = 1; + foreach ($this->runChunk($query, $pageSize, $isCritical) as $chunk) { - $callback($this->process($chunk)); + if ($callback($this->process($chunk), $page) === false) { + return false; + } + + $page++; } $this->logQuery($this, 'chunk', $this->getElapsedTime($start)); + + return true; } /** @@ -549,7 +585,11 @@ class Builder { unset($results['count']); - return $this->paginated ? $this->flattenPages($results) : $results; + if ($this->paginated) { + return $this->flattenPages($results); + } + + return $results; } /** @@ -582,9 +622,7 @@ class Builder */ protected function getCachedResponse($query, Closure $callback) { - // If caching is enabled and we have a cache instance available, - // we will try to retrieve the cached results instead. - if ($this->caching && $this->cache) { + if ($this->cache && $this->caching) { $key = $this->getCacheKey($query); if ($this->flushCache) { @@ -594,7 +632,6 @@ class Builder return $this->cache->remember($key, $this->cacheUntil, $callback); } - // Otherwise, we will simply execute the callback. return $callback(); } @@ -642,10 +679,25 @@ class Builder } return $this->connection->run(function (LdapInterface $ldap) use ($resource) { + $this->controlsResponse = $this->controls; + + $errorCode = 0; + $dn = $errorMessage = $refs = null; + + // Process the server controls response. + $ldap->parseResult( + $resource, + $errorCode, + $dn, + $errorMessage, + $refs, + $this->controlsResponse + ); + $entries = $ldap->getEntries($resource); // Free up memory. - if (is_resource($resource)) { + if (is_resource($resource) || $resource instanceof Result) { $ldap->freeResult($resource); } @@ -684,7 +736,9 @@ class Builder */ public function first($columns = ['*']) { - return Arr::get($this->limit(1)->get($columns), 0); + return Arr::first( + $this->limit(1)->get($columns) + ); } /** @@ -694,9 +748,9 @@ class Builder * * @param array|string $columns * - * @throws ObjectNotFoundException + * @return Model|array * - * @return Model|static + * @throws ObjectNotFoundException */ public function firstOrFail($columns = ['*']) { @@ -707,6 +761,75 @@ class Builder return $record; } + /** + * Return the first entry in a result, or execute the callback. + * + * @param Closure $callback + * + * @return Model|mixed + */ + public function firstOr(Closure $callback) + { + return $this->first() ?: $callback(); + } + + /** + * Execute the query and get the first result if it's the sole matching record. + * + * @param array|string $columns + * + * @return Model|array + * + * @throws ObjectsNotFoundException + * @throws MultipleObjectsFoundException + */ + public function sole($columns = ['*']) + { + $result = $this->limit(2)->get($columns); + + if (empty($result)) { + throw new ObjectsNotFoundException; + } + + if (count($result) > 1) { + throw new MultipleObjectsFoundException; + } + + return reset($result); + } + + /** + * Determine if any results exist for the current query. + * + * @return bool + */ + public function exists() + { + return ! is_null($this->first()); + } + + /** + * Determine if no results exist for the current query. + * + * @return bool + */ + public function doesntExist() + { + return ! $this->exists(); + } + + /** + * Execute the given callback if no rows exist for the current query. + * + * @param Closure $callback + * + * @return bool|mixed + */ + public function existsOr(Closure $callback) + { + return $this->exists() ? true : $callback(); + } + /** * Throws a not found exception. * @@ -747,9 +870,9 @@ class Builder * @param string $value * @param array|string $columns * - * @throws ObjectNotFoundException - * * @return Model + * + * @throws ObjectNotFoundException */ public function findByOrFail($attribute, $value, $columns = ['*']) { @@ -830,9 +953,9 @@ class Builder * @param string $dn * @param array|string $columns * - * @throws ObjectNotFoundException - * * @return Model|static + * + * @throws ObjectNotFoundException */ public function findOrFail($dn, $columns = ['*']) { @@ -876,6 +999,33 @@ class Builder return $this; } + /** + * Add an order by control to the query. + * + * @param string $attribute + * @param string $direction + * + * @return $this + */ + public function orderBy($attribute, $direction = 'asc') + { + return $this->addControl(LDAP_CONTROL_SORTREQUEST, true, [ + ['attr' => $attribute, 'reverse' => $direction === 'desc'], + ]); + } + + /** + * Add an order by descending control to the query. + * + * @param string $attribute + * + * @return $this + */ + public function orderByDesc($attribute) + { + return $this->orderBy($attribute, 'desc'); + } + /** * Adds a raw filter to the current query. * @@ -951,9 +1101,9 @@ class Builder * @param string $boolean * @param bool $raw * - * @throws InvalidArgumentException - * * @return $this + * + * @throws InvalidArgumentException */ public function where($field, $operator = null, $value = null, $boolean = 'and', $raw = false) { @@ -1414,9 +1564,9 @@ class Builder * @param string $type The type of filter to add. * @param array $bindings The bindings of the filter. * - * @throws InvalidArgumentException - * * @return $this + * + * @throws InvalidArgumentException */ public function addFilter($type, array $bindings) { @@ -1610,9 +1760,9 @@ class Builder * @param string $dn * @param array $attributes * - * @throws LdapRecordException - * * @return bool + * + * @throws LdapRecordException */ public function insert($dn, array $attributes) { @@ -1728,9 +1878,9 @@ class Builder * @param string $method * @param array $parameters * - * @throws BadMethodCallException - * * @return mixed + * + * @throws BadMethodCallException */ public function __call($method, $parameters) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Collection.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Collection.php index a02146dc..036affa2 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Collection.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Collection.php @@ -13,6 +13,7 @@ class Collection extends BaseCollection protected function valueRetriever($value) { if ($this->useAsCallable($value)) { + /** @var callable $value */ return $value; } diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Events/QueryExecuted.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Events/QueryExecuted.php index f13ddeb3..4f17ea2a 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Events/QueryExecuted.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Events/QueryExecuted.php @@ -9,14 +9,14 @@ class QueryExecuted /** * The LDAP filter that was used for the query. * - * @var string + * @var Builder */ protected $query; /** * The number of milliseconds it took to execute the query. * - * @var float + * @var ?float */ protected $time; diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Grammar.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Grammar.php index 3217173e..35a6c484 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Grammar.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Grammar.php @@ -506,9 +506,9 @@ class Grammar * * @param array $where * - * @throws UnexpectedValueException - * * @return string + * + * @throws UnexpectedValueException */ protected function compileWhere(array $where) { @@ -522,9 +522,9 @@ class Grammar * * @param string $operator * - * @throws UnexpectedValueException - * * @return string + * + * @throws UnexpectedValueException */ protected function makeCompileMethod($operator) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Model/ActiveDirectoryBuilder.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Model/ActiveDirectoryBuilder.php index 8923015e..c3911d80 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Model/ActiveDirectoryBuilder.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Model/ActiveDirectoryBuilder.php @@ -34,9 +34,9 @@ class ActiveDirectoryBuilder extends Builder * @param string $sid * @param array|string $columns * - * @throws ModelNotFoundException - * * @return \LdapRecord\Models\ActiveDirectory\Entry|static + * + * @throws ModelNotFoundException */ public function findBySidOrFail($sid, $columns = []) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Model/Builder.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Model/Builder.php index eed5e91e..234dd0ad 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Model/Builder.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Model/Builder.php @@ -181,9 +181,9 @@ class Builder extends BaseBuilder * @param string $value * @param array|string $columns * - * @throws ModelNotFoundException - * * @return Model + * + * @throws ModelNotFoundException */ public function findByAnrOrFail($value, $columns = ['*']) { @@ -271,9 +271,9 @@ class Builder extends BaseBuilder * @param string $guid * @param array|string $columns * - * @throws ModelNotFoundException - * * @return Model|static + * + * @throws ModelNotFoundException */ public function findByGuidOrFail($guid, $columns = ['*']) { @@ -434,7 +434,7 @@ class Builder extends BaseBuilder if (! $this->model->isDateAttribute($field)) { throw new \UnexpectedValueException( "Cannot convert field [$field] to an LDAP timestamp. You must add this field as a model date." - .' Refer to https://ldaprecord.com/docs/model-mutators/#date-mutators' + .' Refer to https://ldaprecord.com/docs/core/v2/model-mutators/#date-mutators' ); } diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/MultipleObjectsFoundException.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/MultipleObjectsFoundException.php new file mode 100644 index 00000000..0ece752c --- /dev/null +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/MultipleObjectsFoundException.php @@ -0,0 +1,9 @@ +updateServerControls($ldap, $resource); $pages[] = $this->query->parse($resource); - } while (! empty($this->fetchCookie())); + } while ($this->shouldContinue()); $this->resetServerControls($ldap); return $pages; } + /** + * Whether the paginater should continue iterating. + * + * @return bool + */ + protected function shouldContinue() + { + $cookie = (string) $this->fetchCookie(); + + return $cookie !== ''; + } + /** * Fetch the pagination cookie. * @@ -106,7 +118,7 @@ abstract class AbstractPaginator * * @param LdapInterface $ldap * - * @return mixed + * @return void */ abstract protected function resetServerControls(LdapInterface $ldap); diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Pagination/LazyPaginator.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Pagination/LazyPaginator.php index 2974b8fd..b9df77e4 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Pagination/LazyPaginator.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Pagination/LazyPaginator.php @@ -11,7 +11,7 @@ class LazyPaginator extends Paginator * * @param LdapInterface $ldap * - * @return Generator + * @return \Generator */ public function execute(LdapInterface $ldap) { @@ -27,7 +27,7 @@ class LazyPaginator extends Paginator $this->updateServerControls($ldap, $resource); yield $this->query->parse($resource); - } while (! empty($this->fetchCookie())); + } while ($this->shouldContinue()); $this->resetServerControls($ldap); } diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Pagination/Paginator.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Pagination/Paginator.php index 9ab6e670..c0a31afd 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Pagination/Paginator.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Query/Pagination/Paginator.php @@ -37,7 +37,9 @@ class Paginator extends AbstractPaginator */ protected function updateServerControls(LdapInterface $ldap, $resource) { - $errorCode = $dn = $errorMessage = $refs = null; + $errorCode = 0; + $dn = $errorMessage = $refs = null; + $controls = $this->query->controls; $ldap->parseResult( $resource, @@ -45,20 +47,15 @@ class Paginator extends AbstractPaginator $dn, $errorMessage, $refs, - $this->query->controls + $controls ); - $this->resetPageSize(); - } + $cookie = $controls[LDAP_CONTROL_PAGEDRESULTS]['value']['cookie'] ?? ''; - /** - * Reset the page control page size. - * - * @return void - */ - protected function resetPageSize() - { - $this->query->controls[LDAP_CONTROL_PAGEDRESULTS]['value']['size'] = $this->perPage; + $this->query->controls[LDAP_CONTROL_PAGEDRESULTS]['value'] = [ + 'size' => $this->perPage, + 'cookie' => $cookie, + ]; } /** @@ -66,6 +63,6 @@ class Paginator extends AbstractPaginator */ protected function resetServerControls(LdapInterface $ldap) { - $this->query->controls = []; + unset($this->query->controls[LDAP_CONTROL_PAGEDRESULTS]); } } diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Testing/DirectoryFake.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Testing/DirectoryFake.php index 70640af9..9d50dcdf 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Testing/DirectoryFake.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Testing/DirectoryFake.php @@ -11,9 +11,9 @@ class DirectoryFake * * @param string|null $name * - * @throws \LdapRecord\ContainerException - * * @return ConnectionFake + * + * @throws \LdapRecord\ContainerException */ public static function setup($name = null) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Testing/LdapFake.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Testing/LdapFake.php index 7ba0e153..00470e14 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Testing/LdapFake.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Testing/LdapFake.php @@ -2,6 +2,7 @@ namespace LdapRecord\Testing; +use Closure; use Exception; use LdapRecord\DetailedError; use LdapRecord\DetectsErrors; @@ -81,11 +82,14 @@ class LdapFake implements LdapInterface $expectations = Arr::wrap($expectations); foreach ($expectations as $key => $expectation) { - // If the key is non-numeric, we will assume - // that the string is the method name and - // the expectation is the return value. - if (! is_numeric($key)) { - $expectation = static::operation($key)->andReturn($expectation); + if (! is_int($key)) { + $operation = static::operation($key); + + $expectation instanceof Closure + ? $expectation($operation) + : $operation->andReturn($expectation); + + $expectation = $operation; } if (! $expectation instanceof LdapExpectation) { @@ -322,7 +326,7 @@ class LdapFake implements LdapInterface /** * @inheritdoc */ - public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) + public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []) { return $this->resolveExpectation('search', func_get_args()); } @@ -330,7 +334,7 @@ class LdapFake implements LdapInterface /** * @inheritdoc */ - public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) + public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []) { return $this->resolveExpectation('listing', func_get_args()); } @@ -338,7 +342,7 @@ class LdapFake implements LdapInterface /** * @inheritdoc */ - public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = null, $serverControls = []) + public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0, $deref = LDAP_DEREF_NEVER, $serverControls = []) { return $this->resolveExpectation('read', func_get_args()); } @@ -453,9 +457,9 @@ class LdapFake implements LdapInterface * @param string $method * @param array $args * - * @throws Exception - * * @return mixed + * + * @throws Exception */ protected function resolveExpectation($method, array $args = []) { diff --git a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Utilities.php b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Utilities.php index 0f0ca3c7..01d55c79 100644 --- a/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Utilities.php +++ b/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Utilities.php @@ -112,7 +112,7 @@ class Utilities */ public static function binaryGuidToString($binGuid) { - if (trim($binGuid) == '' || is_null($binGuid)) { + if (is_null($binGuid) || trim($binGuid) == '') { return; } @@ -179,7 +179,7 @@ class Utilities */ public static function isValidSid($sid) { - return (bool) preg_match("/^S-\d(-\d{1,10}){1,16}$/i", $sid); + return (bool) preg_match("/^S-\d(-\d{1,10}){1,16}$/i", (string) $sid); } /** @@ -191,6 +191,6 @@ class Utilities */ public static function isValidGuid($guid) { - return (bool) preg_match('/^([0-9a-fA-F]){8}(-([0-9a-fA-F]){4}){3}-([0-9a-fA-F]){12}$/', $guid); + return (bool) preg_match('/^([0-9a-fA-F]){8}(-([0-9a-fA-F]){4}){3}-([0-9a-fA-F]){12}$/', (string) $guid); } } diff --git a/data/web/inc/lib/vendor/illuminate/contracts/Auth/Guard.php b/data/web/inc/lib/vendor/illuminate/contracts/Auth/Guard.php index 2a27fb5f..2796f1ae 100644 --- a/data/web/inc/lib/vendor/illuminate/contracts/Auth/Guard.php +++ b/data/web/inc/lib/vendor/illuminate/contracts/Auth/Guard.php @@ -40,6 +40,13 @@ interface Guard */ public function validate(array $credentials = []); + /** + * Determine if the guard has a user instance. + * + * @return bool + */ + public function hasUser(); + /** * Set the current user. * diff --git a/data/web/inc/lib/vendor/illuminate/contracts/Auth/PasswordBrokerFactory.php b/data/web/inc/lib/vendor/illuminate/contracts/Auth/PasswordBrokerFactory.php index 47b1c089..683a9030 100644 --- a/data/web/inc/lib/vendor/illuminate/contracts/Auth/PasswordBrokerFactory.php +++ b/data/web/inc/lib/vendor/illuminate/contracts/Auth/PasswordBrokerFactory.php @@ -8,7 +8,7 @@ interface PasswordBrokerFactory * Get a password broker instance by name. * * @param string|null $name - * @return mixed + * @return \Illuminate\Contracts\Auth\PasswordBroker */ public function broker($name = null); } diff --git a/data/web/inc/lib/vendor/illuminate/contracts/Broadcasting/Broadcaster.php b/data/web/inc/lib/vendor/illuminate/contracts/Broadcasting/Broadcaster.php index 1034e440..2d317d0a 100644 --- a/data/web/inc/lib/vendor/illuminate/contracts/Broadcasting/Broadcaster.php +++ b/data/web/inc/lib/vendor/illuminate/contracts/Broadcasting/Broadcaster.php @@ -28,6 +28,8 @@ interface Broadcaster * @param string $event * @param array $payload * @return void + * + * @throws \Illuminate\Broadcasting\BroadcastException */ public function broadcast(array $channels, $event, array $payload = []); } diff --git a/data/web/inc/lib/vendor/illuminate/contracts/Broadcasting/ShouldBroadcast.php b/data/web/inc/lib/vendor/illuminate/contracts/Broadcasting/ShouldBroadcast.php index a4802fe4..3dc4662c 100644 --- a/data/web/inc/lib/vendor/illuminate/contracts/Broadcasting/ShouldBroadcast.php +++ b/data/web/inc/lib/vendor/illuminate/contracts/Broadcasting/ShouldBroadcast.php @@ -7,7 +7,7 @@ interface ShouldBroadcast /** * Get the channels the event should broadcast on. * - * @return \Illuminate\Broadcasting\Channel|\Illuminate\Broadcasting\Channel[] + * @return \Illuminate\Broadcasting\Channel|\Illuminate\Broadcasting\Channel[]|string[]|string */ public function broadcastOn(); } diff --git a/data/web/inc/lib/vendor/illuminate/contracts/Container/Container.php b/data/web/inc/lib/vendor/illuminate/contracts/Container/Container.php index 1b8bb640..7d7f2c96 100644 --- a/data/web/inc/lib/vendor/illuminate/contracts/Container/Container.php +++ b/data/web/inc/lib/vendor/illuminate/contracts/Container/Container.php @@ -81,6 +81,24 @@ interface Container extends ContainerInterface */ public function singletonIf($abstract, $concrete = null); + /** + * Register a scoped binding in the container. + * + * @param string $abstract + * @param \Closure|string|null $concrete + * @return void + */ + public function scoped($abstract, $concrete = null); + + /** + * Register a scoped binding if it hasn't already been registered. + * + * @param string $abstract + * @param \Closure|string|null $concrete + * @return void + */ + public function scopedIf($abstract, $concrete = null); + /** * "Extend" an abstract type in the container. * @@ -163,6 +181,15 @@ interface Container extends ContainerInterface */ public function resolved($abstract); + /** + * Register a new before resolving callback. + * + * @param \Closure|string $abstract + * @param \Closure|null $callback + * @return void + */ + public function beforeResolving($abstract, Closure $callback = null); + /** * Register a new resolving callback. * diff --git a/data/web/inc/lib/vendor/illuminate/contracts/Container/ContextualBindingBuilder.php b/data/web/inc/lib/vendor/illuminate/contracts/Container/ContextualBindingBuilder.php index 05e36253..1fc7fc15 100644 --- a/data/web/inc/lib/vendor/illuminate/contracts/Container/ContextualBindingBuilder.php +++ b/data/web/inc/lib/vendor/illuminate/contracts/Container/ContextualBindingBuilder.php @@ -15,7 +15,7 @@ interface ContextualBindingBuilder /** * Define the implementation for the contextual binding. * - * @param \Closure|string $implementation + * @param \Closure|string|array $implementation * @return void */ public function give($implementation); @@ -27,4 +27,13 @@ interface ContextualBindingBuilder * @return void */ public function giveTagged($tag); + + /** + * Specify the configuration item to bind as a primitive. + * + * @param string $key + * @param ?string $default + * @return void + */ + public function giveConfig($key, $default = null); } diff --git a/data/web/inc/lib/vendor/illuminate/contracts/Database/Eloquent/Builder.php b/data/web/inc/lib/vendor/illuminate/contracts/Database/Eloquent/Builder.php new file mode 100644 index 00000000..6fdf405c --- /dev/null +++ b/data/web/inc/lib/vendor/illuminate/contracts/Database/Eloquent/Builder.php @@ -0,0 +1,14 @@ + */ public function getQueueableIds(); /** * Get the relationships of the entities being queued. * - * @return array + * @return array */ public function getQueueableRelations(); diff --git a/data/web/inc/lib/vendor/illuminate/contracts/Routing/ResponseFactory.php b/data/web/inc/lib/vendor/illuminate/contracts/Routing/ResponseFactory.php index 2cd928dc..86c16cab 100644 --- a/data/web/inc/lib/vendor/illuminate/contracts/Routing/ResponseFactory.php +++ b/data/web/inc/lib/vendor/illuminate/contracts/Routing/ResponseFactory.php @@ -7,7 +7,7 @@ interface ResponseFactory /** * Create a new response instance. * - * @param string $content + * @param array|string $content * @param int $status * @param array $headers * @return \Illuminate\Http\Response diff --git a/data/web/inc/lib/vendor/illuminate/contracts/Routing/UrlGenerator.php b/data/web/inc/lib/vendor/illuminate/contracts/Routing/UrlGenerator.php index e576dda1..cca221cc 100644 --- a/data/web/inc/lib/vendor/illuminate/contracts/Routing/UrlGenerator.php +++ b/data/web/inc/lib/vendor/illuminate/contracts/Routing/UrlGenerator.php @@ -69,6 +69,13 @@ interface UrlGenerator */ public function action($action, $parameters = [], $absolute = true); + /** + * Get the root controller namespace. + * + * @return string + */ + public function getRootControllerNamespace(); + /** * Set the root controller namespace. * diff --git a/data/web/inc/lib/vendor/illuminate/contracts/Support/Arrayable.php b/data/web/inc/lib/vendor/illuminate/contracts/Support/Arrayable.php index 5ad93b70..3194bd11 100755 --- a/data/web/inc/lib/vendor/illuminate/contracts/Support/Arrayable.php +++ b/data/web/inc/lib/vendor/illuminate/contracts/Support/Arrayable.php @@ -2,12 +2,16 @@ namespace Illuminate\Contracts\Support; +/** + * @template TKey of array-key + * @template TValue + */ interface Arrayable { /** * Get the instance as an array. * - * @return array + * @return array */ public function toArray(); } diff --git a/data/web/inc/lib/vendor/illuminate/contracts/Support/CanBeEscapedWhenCastToString.php b/data/web/inc/lib/vendor/illuminate/contracts/Support/CanBeEscapedWhenCastToString.php new file mode 100644 index 00000000..e1be6fef --- /dev/null +++ b/data/web/inc/lib/vendor/illuminate/contracts/Support/CanBeEscapedWhenCastToString.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +if (!class_exists(LazyMacro::class, false)) { + abstract class LazyMacro extends AbstractMacro + { + /** + * {@inheritdoc} + */ + public function getFileName(): ?string + { + return $this->reflectionFunction->getFileName(); + } + + /** + * {@inheritdoc} + */ + public function getStartLine(): ?int + { + return $this->reflectionFunction->getStartLine(); + } + + /** + * {@inheritdoc} + */ + public function getEndLine(): ?int + { + return $this->reflectionFunction->getEndLine(); + } + } +} diff --git a/data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php b/data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php new file mode 100644 index 00000000..3e9fcf4f --- /dev/null +++ b/data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +if (!class_exists(LazyMacro::class, false)) { + abstract class LazyMacro extends AbstractMacro + { + /** + * {@inheritdoc} + * + * @return string|false + */ + public function getFileName() + { + return $this->reflectionFunction->getFileName(); + } + + /** + * {@inheritdoc} + * + * @return int|false + */ + public function getStartLine() + { + return $this->reflectionFunction->getStartLine(); + } + + /** + * {@inheritdoc} + * + * @return int|false + */ + public function getEndLine() + { + return $this->reflectionFunction->getEndLine(); + } + } +} diff --git a/data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php b/data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php new file mode 100644 index 00000000..d35308a6 --- /dev/null +++ b/data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Symfony\Component\Translation\MessageCatalogueInterface; + +if (!class_exists(LazyTranslator::class, false)) { + class LazyTranslator extends AbstractTranslator implements TranslatorStrongTypeInterface + { + public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string + { + return $this->translate($id, $parameters, $domain, $locale); + } + + public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages') + { + $messages = $this->getPrivateProperty($catalogue, 'messages'); + + if (isset($messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id])) { + return $messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id]; + } + + if (isset($messages[$domain][$id])) { + return $messages[$domain][$id]; + } + + $fallbackCatalogue = $this->getPrivateProperty($catalogue, 'fallbackCatalogue'); + + if ($fallbackCatalogue !== null) { + return $this->getFromCatalogue($fallbackCatalogue, $id, $domain); + } + + return $id; + } + + private function getPrivateProperty($instance, string $field) + { + return (function (string $field) { + return $this->$field; + })->call($instance, $field); + } + } +} diff --git a/data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/TranslatorWeakType.php b/data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/TranslatorWeakType.php new file mode 100644 index 00000000..94dbdc30 --- /dev/null +++ b/data/web/inc/lib/vendor/nesbot/carbon/lazy/Carbon/TranslatorWeakType.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +if (!class_exists(LazyTranslator::class, false)) { + class LazyTranslator extends AbstractTranslator + { + /** + * Returns the translation. + * + * @param string|null $id + * @param array $parameters + * @param string|null $domain + * @param string|null $locale + * + * @return string + */ + public function trans($id, array $parameters = [], $domain = null, $locale = null) + { + return $this->translate($id, $parameters, $domain, $locale); + } + } +} diff --git a/data/web/inc/lib/vendor/nesbot/carbon/readme.md b/data/web/inc/lib/vendor/nesbot/carbon/readme.md index 70279c1e..5d827219 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/readme.md +++ b/data/web/inc/lib/vendor/nesbot/carbon/readme.md @@ -3,9 +3,7 @@ [![Latest Stable Version](https://img.shields.io/packagist/v/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) [![Total Downloads](https://img.shields.io/packagist/dt/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) [![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fbriannesbitt%2FCarbon%2Fbadge&style=flat-square&label=Build&logo=none)](https://actions-badge.atrox.dev/briannesbitt/Carbon/goto) -[![StyleCI](https://github.styleci.io/repos/5724990/shield?style=flat-square)](https://github.styleci.io/repos/5724990) [![codecov.io](https://img.shields.io/codecov/c/github/briannesbitt/Carbon.svg?style=flat-square)](https://codecov.io/github/briannesbitt/Carbon?branch=master) -[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-44CC11.svg?longCache=true&style=flat-square)](https://github.com/phpstan/phpstan) [![Tidelift](https://tidelift.com/badges/github/briannesbitt/Carbon)](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme) An international PHP extension for DateTime. [https://carbon.nesbot.com](https://carbon.nesbot.com) diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php new file mode 100644 index 00000000..48441e7c --- /dev/null +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php @@ -0,0 +1,401 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Closure; +use ReflectionException; +use ReflectionFunction; +use Symfony\Component\Translation; +use Symfony\Component\Translation\Formatter\MessageFormatterInterface; +use Symfony\Component\Translation\Loader\ArrayLoader; + +abstract class AbstractTranslator extends Translation\Translator +{ + /** + * Translator singletons for each language. + * + * @var array + */ + protected static $singletons = []; + + /** + * List of custom localized messages. + * + * @var array + */ + protected $messages = []; + + /** + * List of custom directories that contain translation files. + * + * @var string[] + */ + protected $directories = []; + + /** + * Set to true while constructing. + * + * @var bool + */ + protected $initializing = false; + + /** + * List of locales aliases. + * + * @var string[] + */ + protected $aliases = [ + 'me' => 'sr_Latn_ME', + 'scr' => 'sh', + ]; + + /** + * Return a singleton instance of Translator. + * + * @param string|null $locale optional initial locale ("en" - english by default) + * + * @return static + */ + public static function get($locale = null) + { + $locale = $locale ?: 'en'; + $key = static::class === Translator::class ? $locale : static::class.'|'.$locale; + + if (!isset(static::$singletons[$key])) { + static::$singletons[$key] = new static($locale); + } + + return static::$singletons[$key]; + } + + public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) + { + parent::setLocale($locale); + $this->initializing = true; + $this->directories = [__DIR__.'/Lang']; + $this->addLoader('array', new ArrayLoader()); + parent::__construct($locale, $formatter, $cacheDir, $debug); + $this->initializing = false; + } + + /** + * Returns the list of directories translation files are searched in. + * + * @return array + */ + public function getDirectories(): array + { + return $this->directories; + } + + /** + * Set list of directories translation files are searched in. + * + * @param array $directories new directories list + * + * @return $this + */ + public function setDirectories(array $directories) + { + $this->directories = $directories; + + return $this; + } + + /** + * Add a directory to the list translation files are searched in. + * + * @param string $directory new directory + * + * @return $this + */ + public function addDirectory(string $directory) + { + $this->directories[] = $directory; + + return $this; + } + + /** + * Remove a directory from the list translation files are searched in. + * + * @param string $directory directory path + * + * @return $this + */ + public function removeDirectory(string $directory) + { + $search = rtrim(strtr($directory, '\\', '/'), '/'); + + return $this->setDirectories(array_filter($this->getDirectories(), function ($item) use ($search) { + return rtrim(strtr($item, '\\', '/'), '/') !== $search; + })); + } + + /** + * Reset messages of a locale (all locale if no locale passed). + * Remove custom messages and reload initial messages from matching + * file in Lang directory. + * + * @param string|null $locale + * + * @return bool + */ + public function resetMessages($locale = null) + { + if ($locale === null) { + $this->messages = []; + + return true; + } + + foreach ($this->getDirectories() as $directory) { + $data = @include sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale); + + if ($data !== false) { + $this->messages[$locale] = $data; + $this->addResource('array', $this->messages[$locale], $locale); + + return true; + } + } + + return false; + } + + /** + * Returns the list of files matching a given locale prefix (or all if empty). + * + * @param string $prefix prefix required to filter result + * + * @return array + */ + public function getLocalesFiles($prefix = '') + { + $files = []; + + foreach ($this->getDirectories() as $directory) { + $directory = rtrim($directory, '\\/'); + + foreach (glob("$directory/$prefix*.php") as $file) { + $files[] = $file; + } + } + + return array_unique($files); + } + + /** + * Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * + * @param string $prefix prefix required to filter result + * + * @return array + */ + public function getAvailableLocales($prefix = '') + { + $locales = []; + foreach ($this->getLocalesFiles($prefix) as $file) { + $locales[] = substr($file, strrpos($file, '/') + 1, -4); + } + + return array_unique(array_merge($locales, array_keys($this->messages))); + } + + protected function translate(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string + { + if ($domain === null) { + $domain = 'messages'; + } + + $catalogue = $this->getCatalogue($locale); + $format = $this instanceof TranslatorStrongTypeInterface + ? $this->getFromCatalogue($catalogue, (string) $id, $domain) // @codeCoverageIgnore + : $this->getCatalogue($locale)->get((string) $id, $domain); + + if ($format instanceof Closure) { + // @codeCoverageIgnoreStart + try { + $count = (new ReflectionFunction($format))->getNumberOfRequiredParameters(); + } catch (ReflectionException $exception) { + $count = 0; + } + // @codeCoverageIgnoreEnd + + return $format( + ...array_values($parameters), + ...array_fill(0, max(0, $count - \count($parameters)), null) + ); + } + + return parent::trans($id, $parameters, $domain, $locale); + } + + /** + * Init messages language from matching file in Lang directory. + * + * @param string $locale + * + * @return bool + */ + protected function loadMessagesFromFile($locale) + { + if (isset($this->messages[$locale])) { + return true; + } + + return $this->resetMessages($locale); + } + + /** + * Set messages of a locale and take file first if present. + * + * @param string $locale + * @param array $messages + * + * @return $this + */ + public function setMessages($locale, $messages) + { + $this->loadMessagesFromFile($locale); + $this->addResource('array', $messages, $locale); + $this->messages[$locale] = array_merge( + $this->messages[$locale] ?? [], + $messages + ); + + return $this; + } + + /** + * Set messages of the current locale and take file first if present. + * + * @param array $messages + * + * @return $this + */ + public function setTranslations($messages) + { + return $this->setMessages($this->getLocale(), $messages); + } + + /** + * Get messages of a locale, if none given, return all the + * languages. + * + * @param string|null $locale + * + * @return array + */ + public function getMessages($locale = null) + { + return $locale === null ? $this->messages : $this->messages[$locale]; + } + + /** + * Set the current translator locale and indicate if the source locale file exists + * + * @param string $locale locale ex. en + * + * @return bool + */ + public function setLocale($locale) + { + $locale = preg_replace_callback('/[-_]([a-z]{2,}|[0-9]{2,})/', function ($matches) { + // _2-letters or YUE is a region, _3+-letters is a variant + $upper = strtoupper($matches[1]); + + if ($upper === 'YUE' || $upper === 'ISO' || \strlen($upper) < 3) { + return "_$upper"; + } + + return '_'.ucfirst($matches[1]); + }, strtolower($locale)); + + $previousLocale = $this->getLocale(); + + if ($previousLocale === $locale && isset($this->messages[$locale])) { + return true; + } + + unset(static::$singletons[$previousLocale]); + + if ($locale === 'auto') { + $completeLocale = setlocale(LC_TIME, '0'); + $locale = preg_replace('/^([^_.-]+).*$/', '$1', $completeLocale); + $locales = $this->getAvailableLocales($locale); + + $completeLocaleChunks = preg_split('/[_.-]+/', $completeLocale); + + $getScore = function ($language) use ($completeLocaleChunks) { + return self::compareChunkLists($completeLocaleChunks, preg_split('/[_.-]+/', $language)); + }; + + usort($locales, function ($first, $second) use ($getScore) { + return $getScore($second) <=> $getScore($first); + }); + + $locale = $locales[0]; + } + + if (isset($this->aliases[$locale])) { + $locale = $this->aliases[$locale]; + } + + // If subtag (ex: en_CA) first load the macro (ex: en) to have a fallback + if (str_contains($locale, '_') && + $this->loadMessagesFromFile($macroLocale = preg_replace('/^([^_]+).*$/', '$1', $locale)) + ) { + parent::setLocale($macroLocale); + } + + if ($this->loadMessagesFromFile($locale) || $this->initializing) { + parent::setLocale($locale); + + return true; + } + + return false; + } + + /** + * Show locale on var_dump(). + * + * @return array + */ + public function __debugInfo() + { + return [ + 'locale' => $this->getLocale(), + ]; + } + + private static function compareChunkLists($referenceChunks, $chunks) + { + $score = 0; + + foreach ($referenceChunks as $index => $chunk) { + if (!isset($chunks[$index])) { + $score++; + + continue; + } + + if (strtolower($chunks[$index]) === strtolower($chunk)) { + $score += 10; + } + } + + return $score; + } +} diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Carbon.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Carbon.php index 3b687591..e327590e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Carbon.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Carbon.php @@ -8,9 +8,11 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon; use Carbon\Traits\Date; +use Carbon\Traits\DeprecatedProperties; use DateTime; use DateTimeInterface; use DateTimeZone; @@ -18,6 +20,8 @@ use DateTimeZone; /** * A simple API extension for DateTime. * + * @mixin DeprecatedProperties + * * * * @property int $year @@ -34,10 +38,6 @@ use DateTimeZone; * @property string $shortEnglishDayOfWeek the abbreviated day of week in English * @property string $englishMonth the month in English * @property string $shortEnglishMonth the abbreviated month in English - * @property string $localeDayOfWeek the day of week in current locale LC_TIME - * @property string $shortLocaleDayOfWeek the abbreviated day of week in current locale LC_TIME - * @property string $localeMonth the month in current locale LC_TIME - * @property string $shortLocaleMonth the abbreviated month in current locale LC_TIME * @property int $milliseconds * @property int $millisecond * @property int $milli diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonConverterInterface.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonConverterInterface.php index eb0a7093..1ce967b2 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonConverterInterface.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonConverterInterface.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon; use DateTimeInterface; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php index cb1c4988..6d1194ee 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php @@ -8,9 +8,11 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon; use Carbon\Traits\Date; +use Carbon\Traits\DeprecatedProperties; use DateTimeImmutable; use DateTimeInterface; use DateTimeZone; @@ -18,6 +20,8 @@ use DateTimeZone; /** * A simple API extension for DateTimeImmutable. * + * @mixin DeprecatedProperties + * * * * @property int $year @@ -34,10 +38,6 @@ use DateTimeZone; * @property string $shortEnglishDayOfWeek the abbreviated day of week in English * @property string $englishMonth the month in English * @property string $shortEnglishMonth the abbreviated month in English - * @property string $localeDayOfWeek the day of week in current locale LC_TIME - * @property string $shortLocaleDayOfWeek the abbreviated day of week in current locale LC_TIME - * @property string $localeMonth the month in current locale LC_TIME - * @property string $shortLocaleMonth the abbreviated month in current locale LC_TIME * @property int $milliseconds * @property int $millisecond * @property int $milli diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php index 8f095072..15e2061c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon; use BadMethodCallException; @@ -27,6 +28,7 @@ use DateTimeZone; use JsonSerializable; use ReflectionException; use ReturnTypeWillChange; +use Symfony\Component\Translation\TranslatorInterface; use Throwable; /** @@ -48,10 +50,6 @@ use Throwable; * @property string $shortEnglishDayOfWeek the abbreviated day of week in English * @property string $englishMonth the month in English * @property string $shortEnglishMonth the abbreviated month in English - * @property string $localeDayOfWeek the day of week in current locale LC_TIME - * @property string $shortLocaleDayOfWeek the abbreviated day of week in current locale LC_TIME - * @property string $localeMonth the month in current locale LC_TIME - * @property string $shortLocaleMonth the abbreviated month in current locale LC_TIME * @property int $milliseconds * @property int $millisecond * @property int $milli @@ -1270,7 +1268,8 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable /** * Get the difference as a CarbonInterval instance. - * Return absolute interval (always positive) unless you pass false to the second argument. + * Return relative interval (negative if $absolute flag is not set to true and the given date is before + * current one). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference @@ -1312,6 +1311,10 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) + * - 'skip' entry, list of units to skip (array of strings or a single string, + * ` it can be the unit name (singular or plural) or its shortcut + * ` (y, m, w, d, h, min, s, ms, ”s). + * - 'aUnit' entry, prefer "an hour" over "1 hour" if true * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string @@ -1320,6 +1323,8 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * - 'other' entry (see above) + * - 'minimumUnit' entry determines the smallest unit of time to display can be long or + * ` short form of the units, e.g. 'hour' or 'h' (default value: s) * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers @@ -1962,6 +1967,10 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * Format the instance with the current locale. You can set the current * locale using setlocale() https://php.net/setlocale. * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat() instead. + * Deprecated since 2.55.0 + * * @param string $format * * @return string @@ -2148,6 +2157,8 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable /** * {@inheritdoc} + * + * @return array */ #[ReturnTypeWillChange] public static function getLastErrors(); @@ -2259,6 +2270,13 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable */ public static function getTimeFormatByPrecision($unitPrecision); + /** + * Returns the timestamp with millisecond precision. + * + * @return int + */ + public function getTimestampMs(); + /** * Get the translation of the current week day name (with context for languages with multiple forms). * @@ -3332,6 +3350,8 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * Calls \DateTime::modify if mutable or \DateTimeImmutable::modify else. * * @see https://php.net/manual/en/datetime.modify.php + * + * @return static|false */ #[ReturnTypeWillChange] public function modify($modify); @@ -3792,7 +3812,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * @return $this */ - public function setLocalTranslator(\Symfony\Component\Translation\TranslatorInterface $translator); + public function setLocalTranslator(TranslatorInterface $translator); /** * Set the current translator locale and indicate if the source locale file exists. @@ -3832,6 +3852,9 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * Note the timezone parameter was left out of the examples above and * has no affect as the mock value will be returned regardless of its value. * + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * * To clear the test instance call this method using the default * parameter of null. * @@ -3841,6 +3864,27 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable */ public static function setTestNow($testNow = null); + /** + * Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * + * To clear the test instance call this method using the default + * parameter of null. + * + * /!\ Use this method for unit tests only. + * + * @param Closure|static|string|false|null $testNow real or mock Carbon instance + */ + public static function setTestNowAndTimezone($testNow = null, $tz = null); + /** * Resets the current time of the DateTime object to a different time. * @@ -3917,7 +3961,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * @return void */ - public static function setTranslator(\Symfony\Component\Translation\TranslatorInterface $translator); + public static function setTranslator(TranslatorInterface $translator); /** * Set specified unit to new given value. @@ -4772,14 +4816,15 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable /** * Translate using translation string or callback available. * - * @param string $key - * @param array $parameters - * @param string|int|float|null $number - * @param \Symfony\Component\Translation\TranslatorInterface $translator + * @param string $key + * @param array $parameters + * @param string|int|float|null $number + * @param \Symfony\Component\Translation\TranslatorInterface|null $translator + * @param bool $altNumbers * * @return string */ - public function translate(string $key, array $parameters = [], $number = null, ?\Symfony\Component\Translation\TranslatorInterface $translator = null, bool $altNumbers = false): string; + public function translate(string $key, array $parameters = [], $number = null, ?TranslatorInterface $translator = null, bool $altNumbers = false): string; /** * Returns the alternative number for a given integer if available in the current locale. @@ -4828,7 +4873,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * @return string */ - public static function translateWith(\Symfony\Component\Translation\TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string; + public static function translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string; /** * Format as ->format() do (using date replacements patterns from https://php.net/manual/en/function.date.php) @@ -5012,8 +5057,8 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable * * /!\ Use this method for unit tests only. * - * @param Closure|static|string|false|null $testNow real or mock Carbon instance - * @param Closure|null $callback + * @param Closure|static|string|false|null $testNow real or mock Carbon instance + * @param Closure|null $callback * * @return mixed */ diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php index 7168fa4b..d465beac 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon; use Carbon\Exceptions\BadFluentConstructorException; @@ -25,6 +26,8 @@ use Carbon\Traits\Mixin; use Carbon\Traits\Options; use Closure; use DateInterval; +use DateTimeInterface; +use DateTimeZone; use Exception; use ReflectionException; use ReturnTypeWillChange; @@ -189,14 +192,14 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Interval spec period designators */ - const PERIOD_PREFIX = 'P'; - const PERIOD_YEARS = 'Y'; - const PERIOD_MONTHS = 'M'; - const PERIOD_DAYS = 'D'; - const PERIOD_TIME_PREFIX = 'T'; - const PERIOD_HOURS = 'H'; - const PERIOD_MINUTES = 'M'; - const PERIOD_SECONDS = 'S'; + public const PERIOD_PREFIX = 'P'; + public const PERIOD_YEARS = 'Y'; + public const PERIOD_MONTHS = 'M'; + public const PERIOD_DAYS = 'D'; + public const PERIOD_TIME_PREFIX = 'T'; + public const PERIOD_HOURS = 'H'; + public const PERIOD_MINUTES = 'M'; + public const PERIOD_SECONDS = 'S'; /** * A translator to ... er ... translate stuff @@ -253,6 +256,22 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface protected $tzName; /** + * Set the instance's timezone from a string or object. + * + * @param \DateTimeZone|string $tzName + * + * @return static + */ + public function setTimezone($tzName) + { + $this->tzName = $tzName; + + return $this; + } + + /** + * @internal + * * Set the instance's timezone from a string or object and add/subtract the offset difference. * * @param \DateTimeZone|string $tzName @@ -346,7 +365,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface if ($years instanceof DateInterval) { parent::__construct(static::getDateIntervalSpec($years)); $this->f = $years->f; - static::copyNegativeUnits($years, $this); + self::copyNegativeUnits($years, $this); return; } @@ -397,7 +416,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface { $source = self::standardizeUnit($source); $target = self::standardizeUnit($target); - $factors = static::getFlipCascadeFactors(); + $factors = self::getFlipCascadeFactors(); if (isset($factors[$source])) { [$to, $factor] = $factors[$source]; @@ -412,6 +431,37 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface return null; } + /** + * Returns the factor for a given source-to-target couple if set, + * else try to find the appropriate constant as the factor, such as Carbon::DAYS_PER_WEEK. + * + * @param string $source + * @param string $target + * + * @return int|null + */ + public static function getFactorWithDefault($source, $target) + { + $factor = self::getFactor($source, $target); + + if ($factor) { + return $factor; + } + + static $defaults = [ + 'month' => ['year' => Carbon::MONTHS_PER_YEAR], + 'week' => ['month' => Carbon::WEEKS_PER_MONTH], + 'day' => ['week' => Carbon::DAYS_PER_WEEK], + 'hour' => ['day' => Carbon::HOURS_PER_DAY], + 'minute' => ['hour' => Carbon::MINUTES_PER_HOUR], + 'second' => ['minute' => Carbon::SECONDS_PER_MINUTE], + 'millisecond' => ['second' => Carbon::MILLISECONDS_PER_SECOND], + 'microsecond' => ['millisecond' => Carbon::MICROSECONDS_PER_MILLISECOND], + ]; + + return $defaults[$source][$target] ?? null; + } + /** * Returns current config for days per week. * @@ -504,10 +554,10 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface * echo Carboninterval::createFromFormat('H:i', '1:30'); * ``` * - * @param string $format Format of the $interval input string - * @param string $interval Input string to convert into an interval + * @param string $format Format of the $interval input string + * @param string|null $interval Input string to convert into an interval * - * @throws Exception when the $interval cannot be parsed as an interval. + * @throws \Carbon\Exceptions\ParseErrorException when the $interval cannot be parsed as an interval. * * @return static */ @@ -848,10 +898,10 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface } if ($interval instanceof self && is_a($className, self::class, true)) { - static::copyStep($interval, $instance); + self::copyStep($interval, $instance); } - static::copyNegativeUnits($interval, $instance); + self::copyNegativeUnits($interval, $instance); return $instance; } @@ -1358,7 +1408,11 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface $altNumbers = false; $aUnit = false; $minimumUnit = 's'; + $skip = []; extract($this->getForHumansInitialVariables($syntax, $short)); + $skip = array_filter((array) $skip, static function ($value) { + return \is_string($value) && $value !== ''; + }); if ($syntax === null) { $syntax = CarbonInterface::DIFF_ABSOLUTE; @@ -1421,7 +1475,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface ':optional-space' => $optionalSpace, ]; - return [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit]; + return [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit, $skip]; } protected static function getRoundingMethodFromOptions(int $options): ?string @@ -1525,6 +1579,9 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) + * - 'skip' entry, list of units to skip (array of strings or a single string, + * ` it can be the unit name (singular or plural) or its shortcut + * ` (y, m, w, d, h, min, s, ms, ”s). * - 'aUnit' entry, prefer "an hour" over "1 hour" if true * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue @@ -1551,11 +1608,12 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface */ public function forHumans($syntax = null, $short = false, $parts = -1, $options = null) { - [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit] = $this->getForHumansParameters($syntax, $short, $parts, $options); + [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit, $skip] = $this + ->getForHumansParameters($syntax, $short, $parts, $options); $interval = []; - $syntax = (int) ($syntax === null ? CarbonInterface::DIFF_ABSOLUTE : $syntax); + $syntax = (int) ($syntax ?? CarbonInterface::DIFF_ABSOLUTE); $absolute = $syntax === CarbonInterface::DIFF_ABSOLUTE; $relativeToNow = $syntax === CarbonInterface::DIFF_RELATIVE_TO_NOW; $count = 1; @@ -1596,8 +1654,14 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface \count($intervalValues->getNonZeroValues()) > $parts && ($count = \count($keys = array_keys($intervalValues->getValuesSequence()))) > 1 ) { + $index = min($count, $previousCount - 1) - 2; + + if ($index < 0) { + break; + } + $intervalValues = $this->copy()->roundUnit( - $keys[min($count, $previousCount - 1) - 2], + $keys[$index], 1, $method ); @@ -1617,6 +1681,21 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface ['value' => $intervalValues->microExcludeMilli, 'unit' => 'microsecond', 'unitShort' => '”s'], ]; + if (!empty($skip)) { + foreach ($diffIntervalArray as $index => &$unitData) { + $nextIndex = $index + 1; + + if ($unitData['value'] && + isset($diffIntervalArray[$nextIndex]) && + \count(array_intersect([$unitData['unit'], $unitData['unit'].'s', $unitData['unitShort']], $skip)) + ) { + $diffIntervalArray[$nextIndex]['value'] += $unitData['value'] * + self::getFactorWithDefault($diffIntervalArray[$nextIndex]['unit'], $unitData['unit']); + $unitData['value'] = 0; + } + } + } + $transChoice = function ($short, $unitData) use ($absolute, $handleDeclensions, $translator, $aUnit, $altNumbers, $interpolations) { $count = $unitData['value']; @@ -1642,6 +1721,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface }; $fallbackUnit = ['second', 's']; + foreach ($diffIntervalArray as $diffIntervalData) { if ($diffIntervalData['value'] > 0) { $unit = $short ? $diffIntervalData['unitShort'] : $diffIntervalData['unit']; @@ -1763,12 +1843,20 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Convert the interval to a CarbonPeriod. * - * @param array ...$params Start date, [end date or recurrences] and optional settings. + * @param DateTimeInterface|string|int ...$params Start date, [end date or recurrences] and optional settings. * * @return CarbonPeriod */ public function toPeriod(...$params) { + if ($this->tzName) { + $tz = \is_string($this->tzName) ? new DateTimeZone($this->tzName) : $this->tzName; + + if ($tz instanceof DateTimeZone) { + array_unshift($params, $tz); + } + } + return CarbonPeriod::create($this, ...$params); } @@ -1879,8 +1967,8 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Add given parameters to the current interval. * - * @param int $years - * @param int $months + * @param int $years + * @param int $months * @param int|float $weeks * @param int|float $days * @param int|float $hours @@ -1909,8 +1997,8 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface /** * Add given parameters to the current interval. * - * @param int $years - * @param int $months + * @param int $years + * @param int $months * @param int|float $weeks * @param int|float $days * @param int|float $hours @@ -2145,7 +2233,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface unset($originalData['days']); $newData = $originalData; - foreach (static::getFlipCascadeFactors() as $source => [$target, $factor]) { + foreach (self::getFlipCascadeFactors() as $source => [$target, $factor]) { foreach (['source', 'target'] as $key) { if ($$key === 'dayz') { $$key = 'daysExcludeWeeks'; @@ -2235,7 +2323,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface $result = 0; $cumulativeFactor = 0; $unitFound = false; - $factors = static::getFlipCascadeFactors(); + $factors = self::getFlipCascadeFactors(); $daysPerWeek = static::getDaysPerWeek(); $values = [ diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php index 70e6ba49..0e81e757 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon; use Carbon\Exceptions\InvalidCastException; @@ -28,6 +29,7 @@ use DateInterval; use DatePeriod; use DateTime; use DateTimeInterface; +use DateTimeZone; use InvalidArgumentException; use Iterator; use JsonSerializable; @@ -161,6 +163,8 @@ use RuntimeException; * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class CarbonPeriod implements Iterator, Countable, JsonSerializable { @@ -171,17 +175,23 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable use Options; /** - * Built-in filters. + * Built-in filter for limit by recurrences. * - * @var string + * @var callable */ public const RECURRENCES_FILTER = [self::class, 'filterRecurrences']; + + /** + * Built-in filter for limit to an end. + * + * @var callable + */ public const END_DATE_FILTER = [self::class, 'filterEndDate']; /** * Special value which can be returned by filters to end iteration. Also a filter. * - * @var string + * @var callable */ public const END_ITERATION = [self::class, 'endIteration']; @@ -474,8 +484,8 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable $end = null; foreach (explode('/', $iso) as $key => $part) { - if ($key === 0 && preg_match('/^R([0-9]*)$/', $part, $match)) { - $parsed = \strlen($match[1]) ? (int) $match[1] : null; + if ($key === 0 && preg_match('/^R([0-9]*|INF)$/', $part, $match)) { + $parsed = \strlen($match[1]) ? (($match[1] !== 'INF') ? (int) $match[1] : INF) : null; } elseif ($interval === null && $parsed = CarbonInterval::make($part)) { $interval = $part; } elseif ($start === null && $parsed = Carbon::make($part)) { @@ -639,7 +649,11 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable } foreach ($arguments as $argument) { - if ($this->dateInterval === null && + $parsedDate = null; + + if ($argument instanceof DateTimeZone) { + $this->setTimezone($argument); + } elseif ($this->dateInterval === null && ( \is_string($argument) && preg_match( '/^(-?\d(\d(?![\/-])|[^\d\/-]([\/-])?)*|P[T0-9].*|(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+)$/i', @@ -648,13 +662,13 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable $argument instanceof DateInterval || $argument instanceof Closure ) && - $parsed = @CarbonInterval::make($argument) + $parsedInterval = @CarbonInterval::make($argument) ) { - $this->setDateInterval($parsed); - } elseif ($this->startDate === null && $parsed = Carbon::make($argument)) { - $this->setStartDate($parsed); - } elseif ($this->endDate === null && $parsed = Carbon::make($argument)) { - $this->setEndDate($parsed); + $this->setDateInterval($parsedInterval); + } elseif ($this->startDate === null && $parsedDate = $this->makeDateTime($argument)) { + $this->setStartDate($parsedDate); + } elseif ($this->endDate === null && ($parsedDate = $parsedDate ?? $this->makeDateTime($argument))) { + $this->setEndDate($parsedDate); } elseif ($this->recurrences === null && $this->endDate === null && is_numeric($argument)) { $this->setRecurrences($argument); } elseif ($this->options === null && (\is_int($argument) || $argument === null)) { @@ -1305,6 +1319,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @return bool */ + #[ReturnTypeWillChange] public function valid() { return $this->validateCurrentDate() === true; @@ -1315,6 +1330,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @return int|null */ + #[ReturnTypeWillChange] public function key() { return $this->valid() @@ -1327,6 +1343,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @return CarbonInterface|null */ + #[ReturnTypeWillChange] public function current() { return $this->valid() @@ -1341,6 +1358,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @return void */ + #[ReturnTypeWillChange] public function next() { if ($this->current === null) { @@ -1367,6 +1385,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @return void */ + #[ReturnTypeWillChange] public function rewind() { $this->key = 0; @@ -1540,6 +1559,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable * * @return int */ + #[ReturnTypeWillChange] public function count() { return \count($this->toArray()); @@ -1615,14 +1635,14 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable return $this->setStartDate($first, $second); case 'sinceNow': - return $this->setStartDate(new Carbon, $first); + return $this->setStartDate(new Carbon(), $first); case 'end': case 'until': return $this->setEndDate($first, $second); case 'untilNow': - return $this->setEndDate(new Carbon, $first); + return $this->setEndDate(new Carbon(), $first); case 'dates': case 'between': @@ -1689,7 +1709,30 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable } /** - * Set the instance's timezone from a string or object and add/subtract the offset difference. + * Set the instance's timezone from a string or object and apply it to start/end. + * + * @param \DateTimeZone|string $timezone + * + * @return static + */ + public function setTimezone($timezone) + { + $this->tzName = $timezone; + $this->timezone = $timezone; + + if ($this->startDate) { + $this->setStartDate($this->startDate->setTimezone($timezone)); + } + + if ($this->endDate) { + $this->setEndDate($this->endDate->setTimezone($timezone)); + } + + return $this; + } + + /** + * Set the instance's timezone from a string or object and add/subtract the offset difference to start/end. * * @param \DateTimeZone|string $timezone * @@ -1700,6 +1743,14 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable $this->tzName = $timezone; $this->timezone = $timezone; + if ($this->startDate) { + $this->setStartDate($this->startDate->shiftTimezone($timezone)); + } + + if ($this->endDate) { + $this->setEndDate($this->endDate->shiftTimezone($timezone)); + } + return $this; } @@ -2130,7 +2181,10 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable */ public function round($precision = null, $function = 'round') { - return $this->roundWith($precision ?? (string) $this->getDateInterval(), $function); + return $this->roundWith( + $precision ?? $this->getDateInterval()->setLocalTranslator(TranslatorImmutable::get('en'))->forHumans(), + $function + ); } /** @@ -2362,11 +2416,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable } // Check after the first rewind to avoid repeating the initial validation. - if ($this->validationResult !== null) { - return $this->validationResult; - } - - return $this->validationResult = $this->checkFilters(); + return $this->validationResult ?? ($this->validationResult = $this->checkFilters()); } /** @@ -2495,4 +2545,24 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable { return $first > $second ? [$second, $first] : [$first, $second]; } + + private function makeDateTime($value): ?DateTimeInterface + { + if ($value instanceof DateTimeInterface) { + return $value; + } + + if (\is_string($value)) { + $value = trim($value); + + if (!preg_match('/^P[0-9T]/', $value) && + !preg_match('/^R[0-9]/', $value) && + preg_match('/[a-z0-9]/i', $value) + ) { + return Carbon::parse($value, $this->tzName); + } + } + + return null; + } } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php index 2bd36c43..b4d16ba9 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php @@ -8,12 +8,14 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon; use Carbon\Exceptions\InvalidCastException; use Carbon\Exceptions\InvalidTimeZoneException; use DateTimeInterface; use DateTimeZone; +use Throwable; class CarbonTimeZone extends DateTimeZone { @@ -198,7 +200,7 @@ class CarbonTimeZone extends DateTimeZone // @codeCoverageIgnoreStart try { $offset = @$this->getOffset($date) ?: 0; - } catch (\Throwable $e) { + } catch (Throwable $e) { $offset = 0; } // @codeCoverageIgnoreEnd diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Cli/Invoker.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Cli/Invoker.php index d53b1f49..4f35d6c6 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Cli/Invoker.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Cli/Invoker.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Carbon\Cli; class Invoker diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php index 35c5558a..ccc457fc 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonDoctrineType.php @@ -1,9 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ + namespace Carbon\Doctrine; use Doctrine\DBAL\Platforms\AbstractPlatform; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php index 32397434..bf476a77 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonImmutableType.php @@ -1,9 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ + namespace Carbon\Doctrine; use Doctrine\DBAL\Platforms\AbstractPlatform; @@ -12,6 +17,8 @@ class CarbonImmutableType extends DateTimeImmutableType implements CarbonDoctrin { /** * {@inheritdoc} + * + * @return string */ public function getName() { @@ -20,6 +27,8 @@ class CarbonImmutableType extends DateTimeImmutableType implements CarbonDoctrin /** * {@inheritdoc} + * + * @return bool */ public function requiresSQLCommentHint(AbstractPlatform $platform) { diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php index e5f52c7d..9289d84d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonType.php @@ -1,9 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ + namespace Carbon\Doctrine; use Doctrine\DBAL\Platforms\AbstractPlatform; @@ -12,6 +17,8 @@ class CarbonType extends DateTimeType implements CarbonDoctrineType { /** * {@inheritdoc} + * + * @return string */ public function getName() { @@ -20,6 +27,8 @@ class CarbonType extends DateTimeType implements CarbonDoctrineType /** * {@inheritdoc} + * + * @return bool */ public function requiresSQLCommentHint(AbstractPlatform $platform) { diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php index fa0d5b00..ecfe17e7 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/CarbonTypeConverter.php @@ -1,9 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ + namespace Carbon\Doctrine; use Carbon\Carbon; @@ -26,11 +31,21 @@ trait CarbonTypeConverter return Carbon::class; } + /** + * @return string + */ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) { - $precision = ($fieldDeclaration['precision'] ?: 10) === 10 - ? DateTimeDefaultPrecision::get() - : $fieldDeclaration['precision']; + $precision = $fieldDeclaration['precision'] ?: 10; + + if ($fieldDeclaration['secondPrecision'] ?? false) { + $precision = 0; + } + + if ($precision === 10) { + $precision = DateTimeDefaultPrecision::get(); + } + $type = parent::getSQLDeclaration($fieldDeclaration, $platform); if (!$precision) { diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php index f9744b81..642fd413 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeDefaultPrecision.php @@ -1,9 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. */ + namespace Carbon\Doctrine; class DateTimeDefaultPrecision diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php index bc2aa797..b3a08719 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php index a9f453eb..d5cd5564 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php index 7a28f39c..1d7ec542 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php index 307a4ee1..73c2dd86 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; interface BadMethodCallException extends Exception diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php index 86e8a15e..3bbbd77d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; interface Exception diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php index 5fb1c681..a48d4f93 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php index 60ed740d..9739f4d1 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; interface InvalidArgumentException extends Exception diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php index 77466c7d..d2f37019 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php index f5dbfe2f..99bb91c0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php index dd26a901..3341b49d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php index b4c76dc8..5f9f142e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php index abe1aef3..a37e3f5e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php index b061ef16..ede47712 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php index 03bd8ac4..892e16e8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php index bc124a65..3fbe3fc4 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php index 78ce9392..2b4c48e3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Carbon\CarbonInterface; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php index 8bdda85b..41bb6290 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php index 8aab1925..adbc36cd 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php index 33cd1b52..54822d95 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php index 3510b409..0314c5d8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php index 6ca5f5f5..24bf5a68 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; interface RuntimeException extends Exception diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php index 838847ba..8bd8653e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php index 7f8ec9eb..39ee12c5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php index 4591d35b..6c8c01b6 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php index 36468724..901db986 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use BadMethodCallException as BaseBadMethodCallException; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php index 5020369a..c9e9c9ff 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php index d2f76eee..d965c82a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php index b38ae12d..6f8b39f5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Exceptions; use Exception; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Factory.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Factory.php index e1d747f2..f8c72890 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Factory.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Factory.php @@ -8,9 +8,11 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon; use Closure; +use DateTimeInterface; use ReflectionMethod; /** @@ -18,208 +20,222 @@ use ReflectionMethod; * * * - * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a - * new instance. - * @method Carbon|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time. - * If any of $year, $month or $day are set to null their now() values will - * be used. - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * If $hour is not null then the default values for $minute and $second - * will be 0. - * @method Carbon createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now. - * @method Carbon|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. - * @method Carbon|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). - * @method Carbon|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language. - * @method Carbon|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language. - * @method Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today. - * @method Carbon createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today. - * @method Carbon createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method Carbon createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method Carbon createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method Carbon createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method Carbon createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight. - * @method Carbon|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time. - * If any of $year, $month or $day are set to null their now() values will - * be used. - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * If $hour is not null then the default values for $minute and $second - * will be 0. - * If one of the set values is not valid, an InvalidDateException - * will be thrown. - * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation. - * @method Carbon disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method Carbon enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, - * then return the result of the closure (or null if the closure was void). - * @method Carbon fromSerialized($value) Create an instance from a serialized string. - * @method void genericMacro($macro, $priority = 0) Register a custom macro. - * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. - * (It will ignore custom translator dynamic loading.) - * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native - * name, region and variant of the locale. - * @method array getDays() Get the days of the week - * @method string|null getFallbackLocale() Get the fallback locale. - * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). - * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). - * @method array getIsoUnits() Returns list of locale units for ISO formatting. - * @method Carbon getLastErrors() {@inheritdoc} - * @method string getLocale() Get the current translator locale. - * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. - * @method int getMidDayAt() get midday/noon hour - * @method Closure|Carbon getTestNow() Get the Carbon instance (real or mock) to be returned when a "now" - * instance is created. - * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. - * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. - * @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. - * @method int getWeekEndsAt() Get the last day of week - * @method int getWeekStartsAt() Get the first day of week - * @method array getWeekendDays() Get weekend days - * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. - * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. - * @method bool hasMacro($name) Checks if macro is registered globally. - * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. - * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance - * is anything that is not null. - * @method Carbon instance($date) Create a Carbon instance from a DateTime one. - * @method bool isImmutable() Returns true if the current class/instance is immutable. - * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. - * @method bool isMutable() Returns true if the current class/instance is mutable. - * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. - * (It can be overridden in specific instances.) - * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). - * Support is considered enabled if the 3 words are translated in the given locale. - * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). - * Support is considered enabled if the 2 words are translated in the given locale. - * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. - * Support is considered enabled if either year, day or hour has a short variant translated. - * @method void macro($name, $macro) Register a custom macro. - * @method Carbon|null make($var) Make a Carbon instance from given variable if possible. - * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals - * and recurrences). Throw an exception for invalid format, but otherwise return null. - * @method Carbon maxValue() Create a Carbon instance for the greatest supported date. - * @method Carbon minValue() Create a Carbon instance for the lowest supported date. - * @method void mixin($mixin) Mix another object into the class. - * @method Carbon now($tz = null) Get a Carbon instance for the current date and time. - * @method Carbon parse($time = null, $tz = null) Create a carbon instance from a string. - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * @method Carbon parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). - * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). - * @method Carbon|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. - * @method Carbon rawParse($time = null, $tz = null) Create a carbon instance from a string. - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * @method Carbon resetMacros() Remove all macros and generic macros. - * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string - * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather transform Carbon object before the serialization. - * JSON serialize all Carbon instances using the given callback. - * @method Carbon setFallbackLocale($locale) Set the fallback locale. - * @method Carbon setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. - * Pass 'auto' as locale to use closest language from the current LC_TIME locale. - * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider mid-day is always 12pm, then if you need to test if it's an other - * hour, test it explicitly: - * $date->format('G') == 13 - * or to set explicitly to a given hour: - * $date->setTime(13, 0, 0, 0) - * Set midday/noon hour - * @method Carbon setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now" - * instance is created. The provided instance will be returned - * specifically under the following conditions: - * - A call to the static now() method, ex. Carbon::now() - * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) - * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') - * - When a string containing the desired time is passed to Carbon::parse(). - * Note the timezone parameter was left out of the examples above and - * has no affect as the mock value will be returned regardless of its value. - * To clear the test instance call this method using the default - * parameter of null. - * /!\ Use this method for unit tests only. - * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and - * use other method or custom format passed to format() method if you need to dump an other string - * format. - * Set the default format used when type juggling a Carbon instance to a string - * @method void setTranslator(\Symfony\Component\Translation\TranslatorInterface $translator) Set the default translator instance to use. - * @method Carbon setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use UTF-8 language packages on every machine. - * Set if UTF8 will be used for localized date/time. - * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek - * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the - * start of week according to current locale selected and implicitly the end of week. - * Set the last day of week - * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the - * 'first_day_of_week' locale setting to change the start of week according to current locale - * selected and implicitly the end of week. - * Set the first day of week - * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider week-end is always saturday and sunday, and if you have some custom - * week-end days to handle, give to those days an other name and create a macro for them: - * ``` - * Carbon::macro('isDayOff', function ($date) { - * return $date->isSunday() || $date->isMonday(); - * }); - * Carbon::macro('isNotDayOff', function ($date) { - * return !$date->isDayOff(); - * }); - * if ($someDate->isDayOff()) ... - * if ($someDate->isNotDayOff()) ... - * // Add 5 not-off days - * $count = 5; - * while ($someDate->isDayOff() || ($count-- > 0)) { - * $someDate->addDay(); - * } - * ``` - * Set weekend days - * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). - * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). - * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). - * @method Carbon today($tz = null) Create a Carbon instance for today. - * @method Carbon tomorrow($tz = null) Create a Carbon instance for tomorrow. - * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. - * @method string translateWith(\Symfony\Component\Translation\TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. - * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method Carbon useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method mixed withTestNow($testNow = null, $callback = null) Temporarily sets a static date to be used within the callback. - * Using setTestNow to set the date, executing the callback, then - * clearing the test instance. - * /!\ Use this method for unit tests only. - * @method Carbon yesterday($tz = null) Create a Carbon instance for yesterday. + * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a + * new instance. + * @method Carbon|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * @method Carbon createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now. + * @method Carbon|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. + * @method Carbon|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). + * @method Carbon|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language. + * @method Carbon|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language. + * @method Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today. + * @method Carbon createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today. + * @method Carbon createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method Carbon createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method Carbon createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method Carbon createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method Carbon createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight. + * @method Carbon|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * If one of the set values is not valid, an InvalidDateException + * will be thrown. + * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation. + * @method Carbon disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method Carbon enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, + * then return the result of the closure (or null if the closure was void). + * @method Carbon fromSerialized($value) Create an instance from a serialized string. + * @method void genericMacro($macro, $priority = 0) Register a custom macro. + * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native + * name, region and variant of the locale. + * @method array getDays() Get the days of the week + * @method string|null getFallbackLocale() Get the fallback locale. + * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). + * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). + * @method array getIsoUnits() Returns list of locale units for ISO formatting. + * @method array getLastErrors() {@inheritdoc} + * @method string getLocale() Get the current translator locale. + * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. + * @method int getMidDayAt() get midday/noon hour + * @method Closure|Carbon getTestNow() Get the Carbon instance (real or mock) to be returned when a "now" + * instance is created. + * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. + * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. + * @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. + * @method int getWeekEndsAt() Get the last day of week + * @method int getWeekStartsAt() Get the first day of week + * @method array getWeekendDays() Get weekend days + * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasMacro($name) Checks if macro is registered globally. + * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. + * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance + * is anything that is not null. + * @method Carbon instance($date) Create a Carbon instance from a DateTime one. + * @method bool isImmutable() Returns true if the current class/instance is immutable. + * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. + * @method bool isMutable() Returns true if the current class/instance is mutable. + * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. + * (It can be overridden in specific instances.) + * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). + * Support is considered enabled if the 3 words are translated in the given locale. + * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). + * Support is considered enabled if the 2 words are translated in the given locale. + * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. + * Support is considered enabled if either year, day or hour has a short variant translated. + * @method void macro($name, $macro) Register a custom macro. + * @method Carbon|null make($var) Make a Carbon instance from given variable if possible. + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * @method Carbon maxValue() Create a Carbon instance for the greatest supported date. + * @method Carbon minValue() Create a Carbon instance for the lowest supported date. + * @method void mixin($mixin) Mix another object into the class. + * @method Carbon now($tz = null) Get a Carbon instance for the current date and time. + * @method Carbon parse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method Carbon parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). + * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). + * @method Carbon|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. + * @method Carbon rawParse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method Carbon resetMacros() Remove all macros and generic macros. + * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string + * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather transform Carbon object before the serialization. + * JSON serialize all Carbon instances using the given callback. + * @method Carbon setFallbackLocale($locale) Set the fallback locale. + * @method Carbon setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. + * Pass 'auto' as locale to use closest language from the current LC_TIME locale. + * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider mid-day is always 12pm, then if you need to test if it's an other + * hour, test it explicitly: + * $date->format('G') == 13 + * or to set explicitly to a given hour: + * $date->setTime(13, 0, 0, 0) + * Set midday/noon hour + * @method Carbon setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * Note the timezone parameter was left out of the examples above and + * has no affect as the mock value will be returned regardless of its value. + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method Carbon setTestNowAndTimezone($testNow = null, $tz = null) Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump an other string + * format. + * Set the default format used when type juggling a Carbon instance to a string + * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. + * @method Carbon setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use UTF-8 language packages on every machine. + * Set if UTF8 will be used for localized date/time. + * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek + * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the + * start of week according to current locale selected and implicitly the end of week. + * Set the last day of week + * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the + * 'first_day_of_week' locale setting to change the start of week according to current locale + * selected and implicitly the end of week. + * Set the first day of week + * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider week-end is always saturday and sunday, and if you have some custom + * week-end days to handle, give to those days an other name and create a macro for them: + * ``` + * Carbon::macro('isDayOff', function ($date) { + * return $date->isSunday() || $date->isMonday(); + * }); + * Carbon::macro('isNotDayOff', function ($date) { + * return !$date->isDayOff(); + * }); + * if ($someDate->isDayOff()) ... + * if ($someDate->isNotDayOff()) ... + * // Add 5 not-off days + * $count = 5; + * while ($someDate->isDayOff() || ($count-- > 0)) { + * $someDate->addDay(); + * } + * ``` + * Set weekend days + * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). + * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). + * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). + * @method Carbon today($tz = null) Create a Carbon instance for today. + * @method Carbon tomorrow($tz = null) Create a Carbon instance for tomorrow. + * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. + * @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. + * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method Carbon useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method mixed withTestNow($testNow = null, $callback = null) Temporarily sets a static date to be used within the callback. + * Using setTestNow to set the date, executing the callback, then + * clearing the test instance. + * /!\ Use this method for unit tests only. + * @method Carbon yesterday($tz = null) Create a Carbon instance for yesterday. * * */ @@ -289,7 +305,13 @@ class Factory return \in_array($parameter->getName(), ['tz', 'timezone'], true); }); - if (\count($tzParameters)) { + if (isset($arguments[0]) && \in_array($name, ['instance', 'make', 'create', 'parse'], true)) { + if ($arguments[0] instanceof DateTimeInterface) { + $settings['innerTimezone'] = $settings['timezone']; + } elseif (\is_string($arguments[0]) && date_parse($arguments[0])['is_localtime']) { + unset($settings['timezone'], $settings['innerTimezone']); + } + } elseif (\count($tzParameters)) { array_splice($arguments, key($tzParameters), 0, [$settings['timezone']]); unset($settings['timezone']); } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php index 3aa286c0..596ee806 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon; use Closure; @@ -17,208 +18,222 @@ use Closure; * * * - * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a - * new instance. - * @method CarbonImmutable|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time. - * If any of $year, $month or $day are set to null their now() values will - * be used. - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * If $hour is not null then the default values for $minute and $second - * will be 0. - * @method CarbonImmutable createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now. - * @method CarbonImmutable|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. - * @method CarbonImmutable|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). - * @method CarbonImmutable|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language. - * @method CarbonImmutable|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language. - * @method CarbonImmutable createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today. - * @method CarbonImmutable createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today. - * @method CarbonImmutable createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method CarbonImmutable createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method CarbonImmutable createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method CarbonImmutable createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method CarbonImmutable createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight. - * @method CarbonImmutable|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time. - * If any of $year, $month or $day are set to null their now() values will - * be used. - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * If $hour is not null then the default values for $minute and $second - * will be 0. - * If one of the set values is not valid, an InvalidDateException - * will be thrown. - * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation. - * @method CarbonImmutable disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method CarbonImmutable enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, - * then return the result of the closure (or null if the closure was void). - * @method CarbonImmutable fromSerialized($value) Create an instance from a serialized string. - * @method void genericMacro($macro, $priority = 0) Register a custom macro. - * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. - * (It will ignore custom translator dynamic loading.) - * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native - * name, region and variant of the locale. - * @method array getDays() Get the days of the week - * @method string|null getFallbackLocale() Get the fallback locale. - * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). - * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). - * @method array getIsoUnits() Returns list of locale units for ISO formatting. - * @method CarbonImmutable getLastErrors() {@inheritdoc} - * @method string getLocale() Get the current translator locale. - * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. - * @method int getMidDayAt() get midday/noon hour - * @method Closure|CarbonImmutable getTestNow() Get the Carbon instance (real or mock) to be returned when a "now" - * instance is created. - * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. - * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. - * @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. - * @method int getWeekEndsAt() Get the last day of week - * @method int getWeekStartsAt() Get the first day of week - * @method array getWeekendDays() Get weekend days - * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. - * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. - * @method bool hasMacro($name) Checks if macro is registered globally. - * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. - * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance - * is anything that is not null. - * @method CarbonImmutable instance($date) Create a Carbon instance from a DateTime one. - * @method bool isImmutable() Returns true if the current class/instance is immutable. - * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. - * @method bool isMutable() Returns true if the current class/instance is mutable. - * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. - * (It can be overridden in specific instances.) - * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). - * Support is considered enabled if the 3 words are translated in the given locale. - * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). - * Support is considered enabled if the 2 words are translated in the given locale. - * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. - * Support is considered enabled if either year, day or hour has a short variant translated. - * @method void macro($name, $macro) Register a custom macro. - * @method CarbonImmutable|null make($var) Make a Carbon instance from given variable if possible. - * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals - * and recurrences). Throw an exception for invalid format, but otherwise return null. - * @method CarbonImmutable maxValue() Create a Carbon instance for the greatest supported date. - * @method CarbonImmutable minValue() Create a Carbon instance for the lowest supported date. - * @method void mixin($mixin) Mix another object into the class. - * @method CarbonImmutable now($tz = null) Get a Carbon instance for the current date and time. - * @method CarbonImmutable parse($time = null, $tz = null) Create a carbon instance from a string. - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * @method CarbonImmutable parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). - * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). - * @method CarbonImmutable|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. - * @method CarbonImmutable rawParse($time = null, $tz = null) Create a carbon instance from a string. - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * @method CarbonImmutable resetMacros() Remove all macros and generic macros. - * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string - * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather transform Carbon object before the serialization. - * JSON serialize all Carbon instances using the given callback. - * @method CarbonImmutable setFallbackLocale($locale) Set the fallback locale. - * @method CarbonImmutable setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. - * Pass 'auto' as locale to use closest language from the current LC_TIME locale. - * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider mid-day is always 12pm, then if you need to test if it's an other - * hour, test it explicitly: - * $date->format('G') == 13 - * or to set explicitly to a given hour: - * $date->setTime(13, 0, 0, 0) - * Set midday/noon hour - * @method CarbonImmutable setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now" - * instance is created. The provided instance will be returned - * specifically under the following conditions: - * - A call to the static now() method, ex. Carbon::now() - * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) - * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') - * - When a string containing the desired time is passed to Carbon::parse(). - * Note the timezone parameter was left out of the examples above and - * has no affect as the mock value will be returned regardless of its value. - * To clear the test instance call this method using the default - * parameter of null. - * /!\ Use this method for unit tests only. - * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and - * use other method or custom format passed to format() method if you need to dump an other string - * format. - * Set the default format used when type juggling a Carbon instance to a string - * @method void setTranslator(\Symfony\Component\Translation\TranslatorInterface $translator) Set the default translator instance to use. - * @method CarbonImmutable setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use UTF-8 language packages on every machine. - * Set if UTF8 will be used for localized date/time. - * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek - * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the - * start of week according to current locale selected and implicitly the end of week. - * Set the last day of week - * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the - * 'first_day_of_week' locale setting to change the start of week according to current locale - * selected and implicitly the end of week. - * Set the first day of week - * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider week-end is always saturday and sunday, and if you have some custom - * week-end days to handle, give to those days an other name and create a macro for them: - * ``` - * Carbon::macro('isDayOff', function ($date) { - * return $date->isSunday() || $date->isMonday(); - * }); - * Carbon::macro('isNotDayOff', function ($date) { - * return !$date->isDayOff(); - * }); - * if ($someDate->isDayOff()) ... - * if ($someDate->isNotDayOff()) ... - * // Add 5 not-off days - * $count = 5; - * while ($someDate->isDayOff() || ($count-- > 0)) { - * $someDate->addDay(); - * } - * ``` - * Set weekend days - * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). - * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). - * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). - * @method CarbonImmutable today($tz = null) Create a Carbon instance for today. - * @method CarbonImmutable tomorrow($tz = null) Create a Carbon instance for tomorrow. - * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. - * @method string translateWith(\Symfony\Component\Translation\TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. - * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method CarbonImmutable useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method mixed withTestNow($testNow = null, $callback = null) Temporarily sets a static date to be used within the callback. - * Using setTestNow to set the date, executing the callback, then - * clearing the test instance. - * /!\ Use this method for unit tests only. - * @method CarbonImmutable yesterday($tz = null) Create a Carbon instance for yesterday. + * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a + * new instance. + * @method CarbonImmutable|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * @method CarbonImmutable createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now. + * @method CarbonImmutable|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. + * @method CarbonImmutable|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). + * @method CarbonImmutable|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language. + * @method CarbonImmutable|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language. + * @method CarbonImmutable createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today. + * @method CarbonImmutable createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today. + * @method CarbonImmutable createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC. + * Timestamp input can be given as int, float or a string containing one or more numbers. + * @method CarbonImmutable createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight. + * @method CarbonImmutable|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time. + * If any of $year, $month or $day are set to null their now() values will + * be used. + * If $hour is null it will be set to its now() value and the default + * values for $minute and $second will be their now() values. + * If $hour is not null then the default values for $minute and $second + * will be 0. + * If one of the set values is not valid, an InvalidDateException + * will be thrown. + * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation. + * @method CarbonImmutable disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method CarbonImmutable enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, + * then return the result of the closure (or null if the closure was void). + * @method CarbonImmutable fromSerialized($value) Create an instance from a serialized string. + * @method void genericMacro($macro, $priority = 0) Register a custom macro. + * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. + * (It will ignore custom translator dynamic loading.) + * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native + * name, region and variant of the locale. + * @method array getDays() Get the days of the week + * @method string|null getFallbackLocale() Get the fallback locale. + * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). + * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). + * @method array getIsoUnits() Returns list of locale units for ISO formatting. + * @method array getLastErrors() {@inheritdoc} + * @method string getLocale() Get the current translator locale. + * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. + * @method int getMidDayAt() get midday/noon hour + * @method Closure|CarbonImmutable getTestNow() Get the Carbon instance (real or mock) to be returned when a "now" + * instance is created. + * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. + * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. + * @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. + * @method int getWeekEndsAt() Get the last day of week + * @method int getWeekStartsAt() Get the first day of week + * @method array getWeekendDays() Get weekend days + * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. + * @method bool hasMacro($name) Checks if macro is registered globally. + * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. + * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance + * is anything that is not null. + * @method CarbonImmutable instance($date) Create a Carbon instance from a DateTime one. + * @method bool isImmutable() Returns true if the current class/instance is immutable. + * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. + * @method bool isMutable() Returns true if the current class/instance is mutable. + * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. + * (It can be overridden in specific instances.) + * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). + * Support is considered enabled if the 3 words are translated in the given locale. + * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). + * Support is considered enabled if the 2 words are translated in the given locale. + * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). + * Support is considered enabled if the 4 sentences are translated in the given locale. + * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. + * Support is considered enabled if either year, day or hour has a short variant translated. + * @method void macro($name, $macro) Register a custom macro. + * @method CarbonImmutable|null make($var) Make a Carbon instance from given variable if possible. + * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals + * and recurrences). Throw an exception for invalid format, but otherwise return null. + * @method CarbonImmutable maxValue() Create a Carbon instance for the greatest supported date. + * @method CarbonImmutable minValue() Create a Carbon instance for the lowest supported date. + * @method void mixin($mixin) Mix another object into the class. + * @method CarbonImmutable now($tz = null) Get a Carbon instance for the current date and time. + * @method CarbonImmutable parse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method CarbonImmutable parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). + * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). + * @method CarbonImmutable|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. + * @method CarbonImmutable rawParse($time = null, $tz = null) Create a carbon instance from a string. + * This is an alias for the constructor that allows better fluent syntax + * as it allows you to do Carbon::parse('Monday next week')->fn() rather + * than (new Carbon('Monday next week'))->fn(). + * @method CarbonImmutable resetMacros() Remove all macros and generic macros. + * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string + * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather transform Carbon object before the serialization. + * JSON serialize all Carbon instances using the given callback. + * @method CarbonImmutable setFallbackLocale($locale) Set the fallback locale. + * @method CarbonImmutable setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. + * Pass 'auto' as locale to use closest language from the current LC_TIME locale. + * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider mid-day is always 12pm, then if you need to test if it's an other + * hour, test it explicitly: + * $date->format('G') == 13 + * or to set explicitly to a given hour: + * $date->setTime(13, 0, 0, 0) + * Set midday/noon hour + * @method CarbonImmutable setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * Note the timezone parameter was left out of the examples above and + * has no affect as the mock value will be returned regardless of its value. + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method CarbonImmutable setTestNowAndTimezone($testNow = null, $tz = null) Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * To clear the test instance call this method using the default + * parameter of null. + * /!\ Use this method for unit tests only. + * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather let Carbon object being casted to string with DEFAULT_TO_STRING_FORMAT, and + * use other method or custom format passed to format() method if you need to dump an other string + * format. + * Set the default format used when type juggling a Carbon instance to a string + * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. + * @method CarbonImmutable setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use UTF-8 language packages on every machine. + * Set if UTF8 will be used for localized date/time. + * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek + * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the + * start of week according to current locale selected and implicitly the end of week. + * Set the last day of week + * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the + * 'first_day_of_week' locale setting to change the start of week according to current locale + * selected and implicitly the end of week. + * Set the first day of week + * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather consider week-end is always saturday and sunday, and if you have some custom + * week-end days to handle, give to those days an other name and create a macro for them: + * ``` + * Carbon::macro('isDayOff', function ($date) { + * return $date->isSunday() || $date->isMonday(); + * }); + * Carbon::macro('isNotDayOff', function ($date) { + * return !$date->isDayOff(); + * }); + * if ($someDate->isDayOff()) ... + * if ($someDate->isNotDayOff()) ... + * // Add 5 not-off days + * $count = 5; + * while ($someDate->isDayOff() || ($count-- > 0)) { + * $someDate->addDay(); + * } + * ``` + * Set weekend days + * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). + * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). + * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). + * @method CarbonImmutable today($tz = null) Create a Carbon instance for today. + * @method CarbonImmutable tomorrow($tz = null) Create a Carbon instance for tomorrow. + * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. + * @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. + * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method CarbonImmutable useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. + * You should rather use the ->settings() method. + * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants + * are available for quarters, years, decade, centuries, millennia (singular and plural forms). + * @method mixed withTestNow($testNow = null, $callback = null) Temporarily sets a static date to be used within the callback. + * Using setTestNow to set the date, executing the callback, then + * clearing the test instance. + * /!\ Use this method for unit tests only. + * @method CarbonImmutable yesterday($tz = null) Create a Carbon instance for yesterday. * * */ diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/af_NA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/af_NA.php index 40d8d86c..f2fcf053 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/af_NA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/af_NA.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/af.php', [ 'meridiem' => ['v', 'n'], 'weekdays' => ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/af_ZA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/af_ZA.php index 93f4c839..27896bd0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/af_ZA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/af_ZA.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/af.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/agq.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/agq.php index 58c7a110..70114649 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/agq.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/agq.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['a.g', 'a.k'], 'weekdays' => ['tsuʔntsÉš', 'tsuʔukpĂ ', 'tsuʔughɔe', 'tsuʔutɔ̀mlĂČ', 'tsuʔumĂš', 'tsuʔughɚ̂m', 'tsuʔndzÉškɔʔɔ'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_DJ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_DJ.php index 8d377adb..e790b99e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_DJ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_DJ.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ar.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_EH.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_EH.php index 8d377adb..e790b99e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_EH.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_EH.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ar.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_ER.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_ER.php index 8d377adb..e790b99e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_ER.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_ER.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ar.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_IL.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_IL.php index 8d377adb..e790b99e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_IL.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_IL.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ar.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_KM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_KM.php index 8d377adb..e790b99e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_KM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_KM.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ar.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_MR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_MR.php index 8d377adb..e790b99e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_MR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_MR.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ar.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_PS.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_PS.php index 8d377adb..e790b99e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_PS.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_PS.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ar.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_SO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_SO.php index 8d377adb..e790b99e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_SO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_SO.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ar.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_TD.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_TD.php index 8d377adb..e790b99e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_TD.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ar_TD.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ar.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/asa.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/asa.php index 83897571..03bb4839 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/asa.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/asa.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['icheheavo', 'ichamthi'], 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/az_Cyrl.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/az_Cyrl.php index d6979180..28fc62fe 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/az_Cyrl.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/az_Cyrl.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/az.php', [ 'weekdays' => ['базар', 'базар ДртәсО', 'Ń‡Ó™Ń€ŃˆÓ™ĐœĐ±Ó™ Đ°Ń…ŃˆĐ°ĐŒŃ‹', 'Ń‡Ó™Ń€ŃˆÓ™ĐœĐ±Ó™', 'ÒčÒŻĐŒÓ™ Đ°Ń…ŃˆĐ°ĐŒŃ‹', 'ÒčÒŻĐŒÓ™', 'ŃˆÓ™ĐœĐ±Ó™'], 'weekdays_short' => ['Б.', 'Б.Е.', 'Ч.А.', 'Ч.', 'Òž.А.', 'Òž.', 'Đš.'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/az_Latn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/az_Latn.php index 8346a5dd..0be33914 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/az_Latn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/az_Latn.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/az.php', [ 'meridiem' => ['a', 'p'], 'weekdays' => ['bazar', 'bazar ertəsi', 'çərƟənbə axßamı', 'çərƟənbə', 'cĂŒmə axßamı', 'cĂŒmə', 'Ɵənbə'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bas.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bas.php index 1b342bbc..41bfa1d8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bas.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bas.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['I bikɛ̂glĂ ', 'I ɓugajɔp'], 'weekdays' => ['ƋgwĂ  nɔ̂y', 'ƋgwĂ  njaƋgumba', 'ƋgwĂ  Ă»m', 'ƋgwĂ  ƋgĂȘ', 'ƋgwĂ  mbɔk', 'ƋgwĂ  kɔɔ', 'ƋgwĂ  jĂŽn'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/be.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/be.php index ce8dbe83..51b4d0cc 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/be.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/be.php @@ -8,9 +8,14 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + // @codeCoverageIgnoreStart + +use Carbon\CarbonInterface; +use Symfony\Component\Translation\PluralizationRules; + if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { - \Symfony\Component\Translation\PluralizationRules::set(function ($number) { + PluralizationRules::set(function ($number) { return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); }, 'be'); } @@ -113,7 +118,7 @@ return [ 'nextDay' => '[Заўтра ў] LT', 'nextWeek' => '[ĐŁ] dddd [ў] LT', 'lastDay' => '[ĐŁŃ‡ĐŸŃ€Đ° ў] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $current) { + 'lastWeek' => function (CarbonInterface $current) { switch ($current->dayOfWeek) { case 1: case 2: diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bez.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bez.php index 1facc9dc..d59c5ef5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bez.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bez.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['pamilau', 'pamunyi'], 'weekdays' => ['pa mulungu', 'pa shahuviluha', 'pa hivili', 'pa hidatu', 'pa hitayi', 'pa hihanu', 'pa shahulembela'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bg.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bg.php index 0e17673e..f7680740 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bg.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bg.php @@ -17,6 +17,9 @@ * - JD Isaacks * - Glavić */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count ĐłĐŸĐŽĐžĐœĐ°|:count ĐłĐŸĐŽĐžĐœĐž', 'a_year' => 'ĐłĐŸĐŽĐžĐœĐ°|:count ĐłĐŸĐŽĐžĐœĐž', @@ -63,7 +66,7 @@ return [ 'nextDay' => '[УтрД ĐČ] LT', 'nextWeek' => 'dddd [ĐČ] LT', 'lastDay' => '[ВчДра ĐČ] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $current) { + 'lastWeek' => function (CarbonInterface $current) { switch ($current->dayOfWeek) { case 0: case 3: diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bg_BG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bg_BG.php index 85c0783e..b53874d3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bg_BG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bg_BG.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/bg.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bo_CN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bo_CN.php index c3d9d8b1..380abb1e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bo_CN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bo_CN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/bo.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bo_IN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bo_IN.php index a377fb54..ca50d049 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bo_IN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bo_IN.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/bo.php', [ 'meridiem' => ['àœŠàŸ”àŒ‹àœ‘àŸČàœŒàŒ‹', 'àœ•àŸ±àœČàŒ‹àœ‘àŸČàœŒàŒ‹'], 'weekdays' => ['àœ‚àœŸàœ àŒ‹àœ‰àœČàŒ‹àœ˜àŒ‹', 'àœ‚àœŸàœ àŒ‹àœŸàŸłàŒ‹àœ–àŒ‹', 'àœ‚àœŸàœ àŒ‹àœ˜àœČàœ‚àŒ‹àœ‘àœ˜àœąàŒ‹', 'àœ‚àœŸàœ àŒ‹àœŁàŸ·àœ‚àŒ‹àœ”àŒ‹', 'àœ‚àœŸàœ àŒ‹àœ•àœŽàœąàŒ‹àœ–àœŽàŒ‹', 'àœ‚àœŸàœ àŒ‹àœ”àŒ‹àœŠàœ„àœŠàŒ‹', 'àœ‚àœŸàœ àŒ‹àœŠàŸ€àœșàœ“àŒ‹àœ”àŒ‹'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/br_FR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/br_FR.php index 9d939fd9..7f541858 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/br_FR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/br_FR.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/br.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs.php index d2fc5aaa..e5d68083 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs.php @@ -18,6 +18,9 @@ * - Serhan Apaydın * - JD Isaacks */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count godina|:count godine|:count godina', 'y' => ':count godina|:count godine|:count godina', @@ -55,7 +58,7 @@ return [ 'calendar' => [ 'sameDay' => '[danas u] LT', 'nextDay' => '[sutra u] LT', - 'nextWeek' => function (\Carbon\CarbonInterface $current) { + 'nextWeek' => function (CarbonInterface $current) { switch ($current->dayOfWeek) { case 0: return '[u] [nedjelju] [u] LT'; @@ -68,7 +71,7 @@ return [ } }, 'lastDay' => '[jučer u] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $current) { + 'lastWeek' => function (CarbonInterface $current) { switch ($current->dayOfWeek) { case 0: case 3: diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_BA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_BA.php index 4dd21bab..0a591176 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_BA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_BA.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/bs.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_Cyrl.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_Cyrl.php index 09221e0a..e1a17447 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_Cyrl.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_Cyrl.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/bs.php', [ 'meridiem' => ['прД ĐżĐŸĐŽĐœĐ”', 'ĐżĐŸĐżĐŸĐŽĐœĐ”'], 'weekdays' => ['ĐœĐ”ĐŽŃ˜Đ”Ń™Đ°', 'ĐżĐŸĐœĐ”ĐŽŃ˜Đ”Ń™Đ°Đș', 'ŃƒŃ‚ĐŸŃ€Đ°Đș', 'ŃŃ€ĐžŃ˜Đ”ĐŽĐ°', 'чДтĐČртаĐș', 'пДтаĐș', 'ŃŃƒĐ±ĐŸŃ‚Đ°'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_Latn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_Latn.php index 91ed1cc8..b4e363e7 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_Latn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/bs_Latn.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/bs.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca.php index 5c914397..b8b19946 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca.php @@ -21,6 +21,9 @@ * - Xavi * - qcardona */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count any|:count anys', 'a_year' => 'un any|:count anys', @@ -69,19 +72,19 @@ return [ 'LLLL' => 'dddd D MMMM [de] YYYY [a les] H:mm', ], 'calendar' => [ - 'sameDay' => function (\Carbon\CarbonInterface $current) { + 'sameDay' => function (CarbonInterface $current) { return '[avui a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; }, - 'nextDay' => function (\Carbon\CarbonInterface $current) { + 'nextDay' => function (CarbonInterface $current) { return '[demĂ  a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; }, - 'nextWeek' => function (\Carbon\CarbonInterface $current) { + 'nextWeek' => function (CarbonInterface $current) { return 'dddd [a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; }, - 'lastDay' => function (\Carbon\CarbonInterface $current) { + 'lastDay' => function (CarbonInterface $current) { return '[ahir a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; }, - 'lastWeek' => function (\Carbon\CarbonInterface $current) { + 'lastWeek' => function (CarbonInterface $current) { return '[el] dddd [passat a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; }, 'sameElse' => 'L', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_AD.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_AD.php index f5718c39..861acd2a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_AD.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_AD.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ca.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES.php index 84236064..50049786 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ca.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES_Valencia.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES_Valencia.php index f5718c39..861acd2a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES_Valencia.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES_Valencia.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ca.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_FR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_FR.php index f5718c39..861acd2a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_FR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_FR.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ca.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_IT.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_IT.php index f5718c39..861acd2a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_IT.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ca_IT.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ca.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ccp.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ccp.php index ec616a77..99c1dcac 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ccp.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ccp.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['𑄮𑄝𑄹𑄝𑄱𑄮', 'đ‘„„đ‘„§đ‘„Ÿđ‘„Žđ‘„đ‘„ąđ‘„Ž', '𑄟𑄧𑄁𑄉𑄧𑄣𑄮𑄝𑄱𑄮', '𑄝đ‘„Ș𑄖𑄮𑄝𑄱𑄮', 'đ‘„đ‘„łđ‘„ąđ‘„šđ‘„„đ‘„Ș𑄛𑄮𑄝𑄱𑄮', 'đ‘„„đ‘„Ș𑄇𑄮𑄇𑄼𑄱𑄮𑄝𑄱𑄮', 'đ‘„„đ‘„§đ‘„šđ‘„šđ‘„đ‘„ąđ‘„Ž'], 'weekdays_short' => ['𑄮𑄝𑄹', 'đ‘„„đ‘„§đ‘„Ÿđ‘„Ž', '𑄟𑄧𑄁𑄉𑄧𑄣𑄮', '𑄝đ‘„Ș𑄖𑄮', 'đ‘„đ‘„łđ‘„ąđ‘„šđ‘„„đ‘„Ș𑄛𑄮', 'đ‘„„đ‘„Ș𑄇𑄮𑄇𑄼𑄱𑄮', 'đ‘„„đ‘„§đ‘„šđ‘„š'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ccp_IN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ccp_IN.php index 18bd1224..c1fa8af0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ccp_IN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ccp_IN.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ccp.php', [ 'weekend' => [0, 0], ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cgg.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cgg.php index e4244082..09bcc1c7 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cgg.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cgg.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Sande', 'Orwokubanza', 'Orwakabiri', 'Orwakashatu', 'Orwakana', 'Orwakataano', 'Orwamukaaga'], 'weekdays_short' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cs_CZ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cs_CZ.php index a16a3467..ea2517e8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cs_CZ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cs_CZ.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/cs.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cu.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cu.php index 02c983aa..d6d13128 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cu.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cu.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cv.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cv.php index cec1fc91..8aeb73aa 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cv.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cv.php @@ -32,7 +32,7 @@ return [ 'a_second' => '{1}пӗр-ĐžĐș Ò«Đ”ĐșĐșŃƒĐœŃ‚|:count Ò«Đ”ĐșĐșŃƒĐœŃ‚', 'ago' => ':time ĐșĐ°ŃĐ»Đ»Đ°', 'from_now' => function ($time) { - return $time.(preg_match('/сДхДт$/', $time) ? 'Ń€Đ”Đœ' : (preg_match('/Ò«ŃƒĐ»/', $time) ? 'Ń‚Đ°Đœ' : 'Ń€Đ°Đœ')); + return $time.(preg_match('/сДхДт$/u', $time) ? 'Ń€Đ”Đœ' : (preg_match('/Ò«ŃƒĐ»/u', $time) ? 'Ń‚Đ°Đœ' : 'Ń€Đ°Đœ')); }, 'diff_yesterday' => 'Ó–ĐœĐ”Ń€', 'diff_today' => 'ĐŸĐ°ŃĐœ', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cv_RU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cv_RU.php index ddff8931..197bd8d3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cv_RU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cv_RU.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/cv.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cy_GB.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cy_GB.php index 541127c6..2c8148d0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cy_GB.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/cy_GB.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/cy.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/da_DK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/da_DK.php index b3bac1a9..392c4841 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/da_DK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/da_DK.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/da.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/da_GL.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/da_GL.php index b2ba81f5..ea5698b9 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/da_GL.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/da_GL.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/da.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dav.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dav.php index 79f021e1..e95ec4bb 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dav.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dav.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Luma lwa K', 'luma lwa p'], 'weekdays' => ['Ituku ja jumwa', 'Kuramuka jimweri', 'Kuramuka kawi', 'Kuramuka kadadu', 'Kuramuka kana', 'Kuramuka kasanu', 'Kifula nguwo'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/de_LI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/de_LI.php index 82edfa1d..03e606a6 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/de_LI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/de_LI.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/de.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dje.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dje.php index 08ddbf13..74b7ac12 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dje.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dje.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Subbaahi', 'Zaarikay b'], 'weekdays' => ['Alhadi', 'Atinni', 'Atalaata', 'Alarba', 'Alhamisi', 'Alzuma', 'Asibti'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dua.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dua.php index 65d712f5..55e5c7c3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dua.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dua.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['idiɓa', 'ebyĂĄmu'], 'weekdays' => ['Ă©ti', 'mɔ́sĂș', 'kwasĂș', 'mukɔ́sĂș', 'ƋgisĂș', 'ɗónɛsĂș', 'esaɓasĂș'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dv.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dv.php index a2b60dff..4b8d7e1a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dv.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dv.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + $months = [ 'Ț–ȚŹȚ‚ȚȘȚ‡ȚŠȚƒȚ©', 'ȚŠȚŹȚ„Ț°ȚƒȚȘȚ‡ȚŠȚƒȚ©', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php index 208fb5a3..2668d5b0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php @@ -3,7 +3,7 @@ /** * This file is part of the Carbon package. * - * (c) Ahmed Ali + * (c) Brian Nesbitt * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dyo.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dyo.php index ecb649b0..33082e67 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dyo.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/dyo.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Dimas', 'TeneƋ', 'Talata', 'Alarbay', 'Aramisay', 'Arjuma', 'Sibiti'], 'weekdays_short' => ['Dim', 'Ten', 'Tal', 'Ala', 'Ara', 'Arj', 'Sib'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ebu.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ebu.php index 5aab48d9..f60bc6f2 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ebu.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ebu.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['KI', 'UT'], 'weekdays' => ['Kiumia', 'Njumatatu', 'Njumaine', 'Njumatano', 'Aramithi', 'Njumaa', 'NJumamothii'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ee.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ee.php index 2fd9dcd8..f96c5c9d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ee.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ee.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Ƌ', 'ÉŁ'], 'weekdays' => ['kɔsiɖa', 'dzoɖa', 'blaɖa', 'kuɖa', 'yawoɖa', 'fiɖa', 'memleɖa'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ee_TG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ee_TG.php index 02d77e6d..7a8b36c9 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ee_TG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ee_TG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ee.php', [ 'formats' => [ 'LT' => 'HH:mm', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/el.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/el.php index 09cf7e89..7c40f9c1 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/el.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/el.php @@ -19,6 +19,9 @@ * - yiannisdesp * - Ilias Kasmeridis (iliaskasm) */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count Ï‡ÏÏŒÎœÎżÏ‚|:count χρόΜÎčα', 'a_year' => 'έΜας Ï‡ÏÏŒÎœÎżÏ‚|:count χρόΜÎčα', @@ -65,7 +68,7 @@ return [ 'nextDay' => '[ΑύρÎčÎż {}] LT', 'nextWeek' => 'dddd [{}] LT', 'lastDay' => '[ΧΞΔς {}] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $current) { + 'lastWeek' => function (CarbonInterface $current) { switch ($current->dayOfWeek) { case 6: return '[Ï„Îż Ï€ÏÎżÎ·ÎłÎżÏÎŒÎ”ÎœÎż] dddd [{}] LT'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_001.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_001.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_001.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_001.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_150.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_150.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_150.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_150.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AI.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AI.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AS.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AS.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AS.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AS.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AT.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AT.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AT.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_AT.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BB.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BB.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BB.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BB.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BE.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BE.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BI.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BI.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BM.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BM.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BS.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BS.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BS.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BS.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BW.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BW.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BW.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BW.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BZ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BZ.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BZ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_BZ.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CC.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CC.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CC.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CC.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CH.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CH.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CH.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CH.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CK.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CK.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CM.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CM.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CX.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CX.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CX.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_CX.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DE.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DE.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DG.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DM.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_DM.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ER.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ER.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ER.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ER.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FI.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FI.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FJ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FJ.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FJ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FJ.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FK.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FK.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FM.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_FM.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GD.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GD.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GD.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GD.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GG.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GH.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GH.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GH.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GH.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GI.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GI.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GM.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GM.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GU.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GU.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GY.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GY.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GY.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_GY.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_IM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_IM.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_IM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_IM.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_IO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_IO.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_IO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_IO.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ISO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ISO.php index 6ae11c9a..11457b0c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ISO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ISO.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'LT' => 'HH:mm', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_JE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_JE.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_JE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_JE.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_JM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_JM.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_JM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_JM.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KE.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KE.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KI.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KI.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KN.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KN.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KY.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KY.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KY.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_KY.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LC.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LC.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LC.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LC.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LR.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LR.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LS.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LS.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LS.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_LS.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MG.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MH.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MH.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MH.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MH.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MO.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MO.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MP.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MP.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MP.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MP.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MS.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MS.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MS.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MS.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MT.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MT.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MT.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MT.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MU.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MU.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MW.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MW.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MW.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MW.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MY.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MY.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MY.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_MY.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NA.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NA.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NF.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NF.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NF.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NF.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NG.php index 1d0d34ff..67bceaad 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NL.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NL.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NL.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NL.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NR.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NR.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NU.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_NU.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PG.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PK.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PK.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PN.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PN.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PR.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PR.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PW.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PW.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PW.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_PW.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_RW.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_RW.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_RW.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_RW.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SB.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SB.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SB.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SB.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SC.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SC.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SC.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SC.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SD.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SD.php index ce4780c6..c4e2557e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SD.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SD.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 6, 'weekend' => [5, 6], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SE.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SE.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SG.php index ed0b3f93..5ee95241 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'from_now' => 'in :time', 'formats' => [ diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SH.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SH.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SH.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SH.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SI.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SI.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SL.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SL.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SL.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SL.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SS.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SS.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SS.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SS.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SX.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SX.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SX.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SX.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SZ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SZ.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SZ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_SZ.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TC.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TC.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TC.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TC.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TK.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TK.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TO.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TO.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TT.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TT.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TT.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TT.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TV.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TV.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TV.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TV.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TZ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TZ.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TZ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_TZ.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_UG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_UG.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_UG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_UG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_UM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_UM.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_UM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_UM.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_US.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_US.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_US.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_US.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_US_Posix.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_US_Posix.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_US_Posix.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_US_Posix.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VC.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VC.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VC.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VC.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VG.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VI.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VI.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VU.php index 9f2a3f74..e2dd81db 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_VU.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_WS.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_WS.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_WS.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_WS.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ZW.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ZW.php index 31f60e19..f086dc63 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ZW.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/en_ZW.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/en.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es.php index daaf2570..f77ec39c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es.php @@ -27,6 +27,9 @@ * - Daniel Commesse LiĂ©vanos (danielcommesse) * - Pete Scopes (pdscopes) */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count año|:count años', 'a_year' => 'un año|:count años', @@ -77,19 +80,19 @@ return [ 'LLLL' => 'dddd, D [de] MMMM [de] YYYY H:mm', ], 'calendar' => [ - 'sameDay' => function (\Carbon\CarbonInterface $current) { + 'sameDay' => function (CarbonInterface $current) { return '[hoy a la'.($current->hour !== 1 ? 's' : '').'] LT'; }, - 'nextDay' => function (\Carbon\CarbonInterface $current) { + 'nextDay' => function (CarbonInterface $current) { return '[mañana a la'.($current->hour !== 1 ? 's' : '').'] LT'; }, - 'nextWeek' => function (\Carbon\CarbonInterface $current) { + 'nextWeek' => function (CarbonInterface $current) { return 'dddd [a la'.($current->hour !== 1 ? 's' : '').'] LT'; }, - 'lastDay' => function (\Carbon\CarbonInterface $current) { + 'lastDay' => function (CarbonInterface $current) { return '[ayer a la'.($current->hour !== 1 ? 's' : '').'] LT'; }, - 'lastWeek' => function (\Carbon\CarbonInterface $current) { + 'lastWeek' => function (CarbonInterface $current) { return '[el] dddd [pasado a la'.($current->hour !== 1 ? 's' : '').'] LT'; }, 'sameElse' => 'L', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_BR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_BR.php index e9dbe2b9..378d0547 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_BR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_BR.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_BZ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_BZ.php index e9dbe2b9..378d0547 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_BZ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_BZ.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_CU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_CU.php index 96391d47..f02e1a66 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_CU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_CU.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_EA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_EA.php index 96391d47..f02e1a66 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_EA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_EA.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_GQ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_GQ.php index 96391d47..f02e1a66 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_GQ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_GQ.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_IC.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_IC.php index 96391d47..f02e1a66 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_IC.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_IC.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_PH.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_PH.php index ea345b21..deae06a1 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_PH.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/es_PH.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/es.php', [ 'first_day_of_week' => 0, 'formats' => [ diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/et_EE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/et_EE.php index 3588f627..0f112b34 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/et_EE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/et_EE.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/et.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/eu_ES.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/eu_ES.php index 442cca79..0d1e82a9 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/eu_ES.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/eu_ES.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/eu.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ewo.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ewo.php index f5ae8cf9..7808ab50 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ewo.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ewo.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['kĂ­kĂ­rĂ­g', 'ngəgĂłgəle'], 'weekdays' => ['sɔ́ndɔ', 'mɔ́ndi', 'sɔ́ndɔ məlĂș mə́bɛ̌', 'sɔ́ndɔ məlĂș mə́lɛ́', 'sɔ́ndɔ məlĂș mə́nyi', 'fĂșladĂ©', 'sĂ©radĂ©'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fa_AF.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fa_AF.php index 06566fa4..69471004 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fa_AF.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fa_AF.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fa.php', [ 'meridiem' => ['ق', 'Űš'], 'weekend' => [4, 5], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fa_IR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fa_IR.php index 6d1832c2..08d01825 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fa_IR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fa_IR.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fa.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_CM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_CM.php index dafa98e3..b797ac09 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_CM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_CM.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ff.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_GN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_GN.php index dafa98e3..b797ac09 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_GN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_GN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ff.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_MR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_MR.php index 65276d3f..2f4c29f6 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_MR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ff_MR.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ff.php', [ 'formats' => [ 'LT' => 'h:mm a', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fi_FI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fi_FI.php index 3597fa22..920f1caa 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fi_FI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fi_FI.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fi.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fo_DK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fo_DK.php index e0f45378..657f2c5b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fo_DK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fo_DK.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fo.php', [ 'formats' => [ 'L' => 'DD.MM.yy', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fo_FO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fo_FO.php index 6a4bc313..6d736167 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fo_FO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fo_FO.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fo.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BF.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BF.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BF.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BF.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BI.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BI.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BJ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BJ.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BJ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BJ.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BL.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BL.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BL.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_BL.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CD.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CD.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CD.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CD.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CF.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CF.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CF.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CF.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CG.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CG.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CI.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CI.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CM.php index 52b951cd..67d37878 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_CM.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fr.php', [ 'meridiem' => ['mat.', 'soir'], ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_DJ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_DJ.php index 40579a46..2f060869 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_DJ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_DJ.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fr.php', [ 'first_day_of_week' => 6, 'formats' => [ diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_DZ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_DZ.php index 2c1ab853..ae8db5fa 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_DZ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_DZ.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fr.php', [ 'first_day_of_week' => 6, 'weekend' => [5, 6], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_FR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_FR.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_FR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_FR.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GA.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GA.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GF.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GF.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GF.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GF.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GN.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GP.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GP.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GP.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GP.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GQ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GQ.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GQ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_GQ.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_HT.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_HT.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_HT.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_HT.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_KM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_KM.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_KM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_KM.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MA.php index 7d2b1dbe..1bf034dc 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MA.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fr.php', [ 'first_day_of_week' => 6, 'weekend' => [5, 6], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MC.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MC.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MC.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MC.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MF.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MF.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MF.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MF.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MG.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MG.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_ML.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_ML.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_ML.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_ML.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MQ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MQ.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MQ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MQ.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MR.php index d177a7d7..37cf83f0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MR.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fr.php', [ 'formats' => [ 'LT' => 'h:mm a', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MU.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_MU.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_NC.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_NC.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_NC.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_NC.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_NE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_NE.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_NE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_NE.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_PF.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_PF.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_PF.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_PF.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_PM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_PM.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_PM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_PM.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_RE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_RE.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_RE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_RE.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_RW.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_RW.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_RW.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_RW.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SC.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SC.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SC.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SC.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SN.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SY.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SY.php index 2c1ab853..ae8db5fa 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SY.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_SY.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fr.php', [ 'first_day_of_week' => 6, 'weekend' => [5, 6], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TD.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TD.php index d177a7d7..37cf83f0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TD.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TD.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fr.php', [ 'formats' => [ 'LT' => 'h:mm a', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TG.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TG.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TN.php index d3e26568..6905e7a8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_TN.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fr.php', [ 'weekend' => [5, 6], 'formats' => [ diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_VU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_VU.php index d177a7d7..37cf83f0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_VU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_VU.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fr.php', [ 'formats' => [ 'LT' => 'h:mm a', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_WF.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_WF.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_WF.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_WF.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_YT.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_YT.php index f9801e87..ec3ee359 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_YT.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/fr_YT.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/fr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ga_IE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ga_IE.php index d50630cf..57b0c4fb 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ga_IE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ga_IE.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ga.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gd_GB.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gd_GB.php index 80da9c65..4fc26b3d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gd_GB.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gd_GB.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/gd.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gl.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gl.php index 58c1db15..088b0f28 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gl.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gl.php @@ -17,6 +17,9 @@ * - Diego Vilariño * - Sebastian Thierer */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count ano|:count anos', 'a_year' => 'un ano|:count anos', @@ -65,19 +68,19 @@ return [ 'LLLL' => 'dddd, D [de] MMMM [de] YYYY H:mm', ], 'calendar' => [ - 'sameDay' => function (\Carbon\CarbonInterface $current) { + 'sameDay' => function (CarbonInterface $current) { return '[hoxe '.($current->hour !== 1 ? 'ĂĄs' : 'ĂĄ').'] LT'; }, - 'nextDay' => function (\Carbon\CarbonInterface $current) { + 'nextDay' => function (CarbonInterface $current) { return '[mañå '.($current->hour !== 1 ? 'ĂĄs' : 'ĂĄ').'] LT'; }, - 'nextWeek' => function (\Carbon\CarbonInterface $current) { + 'nextWeek' => function (CarbonInterface $current) { return 'dddd ['.($current->hour !== 1 ? 'ĂĄs' : 'ĂĄ').'] LT'; }, - 'lastDay' => function (\Carbon\CarbonInterface $current) { + 'lastDay' => function (CarbonInterface $current) { return '[onte '.($current->hour !== 1 ? 'ĂĄ' : 'a').'] LT'; }, - 'lastWeek' => function (\Carbon\CarbonInterface $current) { + 'lastWeek' => function (CarbonInterface $current) { return '[o] dddd [pasado '.($current->hour !== 1 ? 'ĂĄs' : 'ĂĄ').'] LT'; }, 'sameElse' => 'L', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gl_ES.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gl_ES.php index 12a565ff..9d6c1d96 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gl_ES.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gl_ES.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/gl.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gom_Latn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gom_Latn.php index 5e54a368..612bb886 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gom_Latn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gom_Latn.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return [ 'year' => ':count voros|:count vorsam', 'y' => ':countv', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_CH.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_CH.php index 0dba9c54..594eb25d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_CH.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_CH.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/gsw.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_FR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_FR.php index e0e7b234..3581dcfb 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_FR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_FR.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/gsw.php', [ 'meridiem' => ['vorm.', 'nam.'], 'months' => ['Januar', 'Februar', 'MĂ€rz', 'April', 'Mai', 'Juni', 'Juli', 'Auguscht', 'SeptĂ€mber', 'Oktoober', 'NovĂ€mber', 'DezĂ€mber'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_LI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_LI.php index e0e7b234..3581dcfb 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_LI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gsw_LI.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/gsw.php', [ 'meridiem' => ['vorm.', 'nam.'], 'months' => ['Januar', 'Februar', 'MĂ€rz', 'April', 'Mai', 'Juni', 'Juli', 'Auguscht', 'SeptĂ€mber', 'Oktoober', 'NovĂ€mber', 'DezĂ€mber'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gu.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gu.php index 7c7872bc..8bc43114 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gu.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gu.php @@ -18,7 +18,7 @@ return [ 'year' => 'àȘàȘ• àȘ”àȘ°à«àȘ·|:count àȘ”àȘ°à«àȘ·', 'y' => ':countàȘ”àȘ°à«àȘ·|:countàȘ”àȘ°à«àȘ·à«‹', - 'month' => 'àȘàȘ• àȘźàȘčàȘżàȘšà«‹|:count àȘźàȘčàȘżàȘšà«‹', + 'month' => 'àȘàȘ• àȘźàȘčàȘżàȘšà«‹|:count àȘźàȘčàȘżàȘšàȘŸ', 'm' => ':countàȘźàȘčàȘżàȘšà«‹|:countàȘźàȘčàȘżàȘšàȘŸ', 'week' => ':count àȘ…àȘ àȘ”àȘŸàȘĄàȘżàȘŻà«àȘ‚|:count àȘ…àȘ àȘ”àȘŸàȘĄàȘżàȘŻàȘŸ', 'w' => ':countàȘ…àȘ .|:countàȘ…àȘ .', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gu_IN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gu_IN.php index c5784408..02654b1f 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gu_IN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/gu_IN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/gu.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/guz.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/guz.php index aa9769ce..6230165c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/guz.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/guz.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Ma', 'Mo'], 'weekdays' => ['Chumapiri', 'Chumatato', 'Chumaine', 'Chumatano', 'Aramisi', 'Ichuma', 'Esabato'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_GH.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_GH.php index bce5e415..f9f99a73 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_GH.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_GH.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ha.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_NE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_NE.php index bce5e415..f9f99a73 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_NE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_NE.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ha.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_NG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_NG.php index bce5e415..f9f99a73 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_NG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ha_NG.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ha.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/haw.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/haw.php index 51715d8e..cdd36861 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/haw.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/haw.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'months' => ['Ianuali', 'Pepeluali', 'Malaki', 'Ê»Apelila', 'Mei', 'Iune', 'Iulai', 'Ê»Aukake', 'Kepakemapa', 'Ê»Okakopa', 'Nowemapa', 'Kekemapa'], 'months_short' => ['Ian.', 'Pep.', 'Mal.', 'Ê»Ap.', 'Mei', 'Iun.', 'Iul.', 'Ê»Au.', 'Kep.', 'Ê»Ok.', 'Now.', 'Kek.'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/he_IL.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/he_IL.php index 57c4fec8..14fab3e9 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/he_IL.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/he_IL.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/he.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hi_IN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hi_IN.php index ac302995..749dd97c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hi_IN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hi_IN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/hi.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hr.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hr.php index acb7e92c..cfd85fd4 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hr.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hr.php @@ -27,6 +27,9 @@ * - Stjepan Majdak * - Vanja Retkovac (vr00) */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count godinu|:count godine|:count godina', 'y' => ':count god.|:count god.|:count god.', @@ -67,7 +70,7 @@ return [ 'calendar' => [ 'sameDay' => '[danas u] LT', 'nextDay' => '[sutra u] LT', - 'nextWeek' => function (\Carbon\CarbonInterface $date) { + 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[u] [nedjelju] [u] LT'; @@ -80,7 +83,7 @@ return [ } }, 'lastDay' => '[jučer u] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $date) { + 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: case 3: diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hr_HR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hr_HR.php index 2ae141dc..db74d8c7 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hr_HR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hr_HR.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/hr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hu.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hu.php index 673f9dc4..b2d2ac11 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hu.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hu.php @@ -15,6 +15,9 @@ * - Brett Johnson * - balping */ + +use Carbon\CarbonInterface; + $huWeekEndings = ['vasĂĄrnap', 'hĂ©tfƑn', 'kedden', 'szerdĂĄn', 'csĂŒtörtökön', 'pĂ©nteken', 'szombaton']; return [ @@ -99,11 +102,11 @@ return [ 'calendar' => [ 'sameDay' => '[ma] LT[-kor]', 'nextDay' => '[holnap] LT[-kor]', - 'nextWeek' => function (\Carbon\CarbonInterface $date) use ($huWeekEndings) { + 'nextWeek' => function (CarbonInterface $date) use ($huWeekEndings) { return '['.$huWeekEndings[$date->dayOfWeek].'] LT[-kor]'; }, 'lastDay' => '[tegnap] LT[-kor]', - 'lastWeek' => function (\Carbon\CarbonInterface $date) use ($huWeekEndings) { + 'lastWeek' => function (CarbonInterface $date) use ($huWeekEndings) { return '[mĂșlt '.$huWeekEndings[$date->dayOfWeek].'] LT[-kor]'; }, 'sameElse' => 'L', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hu_HU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hu_HU.php index b33a6319..b1c48541 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hu_HU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/hu_HU.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/hu.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/i18n.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/i18n.php index d19e4f40..e65449b8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/i18n.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/i18n.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'YYYY-MM-DD', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/id_ID.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/id_ID.php index 406112af..d5953a14 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/id_ID.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/id_ID.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/id.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ii.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ii.php index 30f83740..a4246c27 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ii.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ii.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['ꎞꄑ', 'êŻê‹’'], 'weekdays' => ['ꑭꆏꑍ', 'ꆏꊂꋍ', 'ꆏꊂꑍ', 'ꆏꊂꌕ', 'ꆏꊂꇖ', 'ê†êŠ‚ê‰Ź', 'ꆏꊂꃘ'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/in.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/in.php index 406112af..d5953a14 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/in.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/in.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/id.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/is_IS.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/is_IS.php index 8b91bb23..4d35c448 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/is_IS.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/is_IS.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/is.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it.php index c23d8db1..605bcbb5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it.php @@ -22,6 +22,9 @@ * - Davide Casiraghi (davide-casiraghi) * - Pete Scopes (pdscopes) */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count anno|:count anni', 'a_year' => 'un anno|:count anni', @@ -81,7 +84,7 @@ return [ 'nextDay' => '[Domani alle] LT', 'nextWeek' => 'dddd [alle] LT', 'lastDay' => '[Ieri alle] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $date) { + 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[la scorsa] dddd [alle] LT'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it_SM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it_SM.php index 57fab39a..5e8fc92f 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it_SM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it_SM.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/it.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it_VA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it_VA.php index 57fab39a..5e8fc92f 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it_VA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/it_VA.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/it.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/iw.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/iw.php index a8034e83..a26e3506 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/iw.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/iw.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'months' => ['Ś™Ś Ś•ŚŚš', 'Ś€Ś‘ŚšŚ•ŚŚš', 'ŚžŚšŚ„', 'ŚŚ€ŚšŚ™Śœ', 'ŚžŚŚ™', 'ڙڕڠڙ', 'Ś™Ś•ŚœŚ™', 'ŚŚ•Ś’Ś•ŚĄŚ˜', 'ŚĄŚ€Ś˜ŚžŚ‘Śš', 'ŚŚ•Ś§Ś˜Ś•Ś‘Śš', 'Ś Ś•Ś‘ŚžŚ‘Śš', 'Ś“ŚŠŚžŚ‘Śš'], 'months_short' => ['Ś™Ś Ś•Śł', 'Ś€Ś‘ŚšŚł', 'ŚžŚšŚ„', 'ŚŚ€ŚšŚł', 'ŚžŚŚ™', 'ڙڕڠڙ', 'Ś™Ś•ŚœŚ™', 'ŚŚ•Ś’Śł', 'ŚĄŚ€Ś˜Śł', 'ŚŚ•Ś§Śł', 'Ś Ś•Ś‘Śł', 'Ś“ŚŠŚžŚł'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ja.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ja.php index fa4cb367..1ca67519 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ja.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ja.php @@ -21,6 +21,9 @@ * - toyama satoshi * - atakigawa */ + +use Carbon\CarbonInterface; + return [ 'year' => ':countćčŽ', 'y' => ':countćčŽ', @@ -56,7 +59,7 @@ return [ 'calendar' => [ 'sameDay' => '[今旄] LT', 'nextDay' => '[明旄] LT', - 'nextWeek' => function (\Carbon\CarbonInterface $current, \Carbon\CarbonInterface $other) { + 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { if ($other->week !== $current->week) { return '[杄週]dddd LT'; } @@ -64,7 +67,7 @@ return [ return 'dddd LT'; }, 'lastDay' => '[昚旄] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $current, \Carbon\CarbonInterface $other) { + 'lastWeek' => function (CarbonInterface $current, CarbonInterface $other) { if ($other->week !== $current->week) { return '[ć…ˆé€±]dddd LT'; } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ja_JP.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ja_JP.php index 9e035fdb..c2836253 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ja_JP.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ja_JP.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ja.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/jgo.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/jgo.php index bad6beb7..6a1e77a8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/jgo.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/jgo.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/jmc.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/jmc.php index f8cc72c1..ed92e8e7 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/jmc.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/jmc.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['utuko', 'kyiukonyi'], 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ka.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ka.php index 5ddb957d..a5d563d3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ka.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ka.php @@ -24,6 +24,9 @@ * - Avtandil Kikabidze (akalongman) * - Levan Velijanashvili (Stichoza) */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count წელი', 'y' => ':count წელი', @@ -149,7 +152,7 @@ return [ 'calendar' => [ 'sameDay' => '[დჩეს], LT[-ზე]', 'nextDay' => '[ჼვალ], LT[-ზე]', - 'nextWeek' => function (\Carbon\CarbonInterface $current, \Carbon\CarbonInterface $other) { + 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { return ($current->isSameWeek($other) ? '' : '[ჹემდეგ] ').'dddd, LT[-ზე]'; }, 'lastDay' => '[გუჹინ], LT[-ზე]', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ka_GE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ka_GE.php index dd77fa3e..a26d9305 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ka_GE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ka_GE.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ka.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kam.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kam.php index 0fb6b2ea..0fc70d70 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kam.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kam.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Äšyakwakya', 'ÄšyawÄ©oo'], 'weekdays' => ['Wa kyumwa', 'Wa kwambÄ©lÄ©lya', 'Wa kelÄ©', 'Wa katatĆ©', 'Wa kana', 'Wa katano', 'Wa thanthatĆ©'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kde.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kde.php index 8acdaba3..fbcc9f3d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kde.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kde.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Muhi', 'Chilo'], 'weekdays' => ['Liduva lyapili', 'Liduva lyatatu', 'Liduva lyanchechi', 'Liduva lyannyano', 'Liduva lyannyano na linji', 'Liduva lyannyano na mavili', 'Liduva litandi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kea.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kea.php index 8a334e24..8b6c21b9 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kea.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kea.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['a', 'p'], 'weekdays' => ['dumingu', 'sigunda-fera', 'tersa-fera', 'kuarta-fera', 'kinta-fera', 'sesta-fera', 'sabadu'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/khq.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/khq.php index f0649e7c..7a834cf0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/khq.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/khq.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Adduha', 'Aluula'], 'weekdays' => ['Alhadi', 'Atini', 'Atalata', 'Alarba', 'Alhamiisa', 'Aljuma', 'Assabdu'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ki.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ki.php index 5754ffc1..d86afc50 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ki.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ki.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Kiroko', 'HwaÄ©-inÄ©'], 'weekdays' => ['Kiumia', 'NjumatatĆ©', 'Njumaine', 'Njumatana', 'Aramithi', 'Njumaa', 'Njumamothi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kk_KZ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kk_KZ.php index af4a5b2b..7dc5ebcc 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kk_KZ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kk_KZ.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/kk.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kkj.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kkj.php index bad6beb7..6a1e77a8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kkj.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kkj.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kln.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kln.php index b034ba50..b9c39968 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kln.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kln.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['krn', 'koosk'], 'weekdays' => ['Kotisap', 'Kotaai', 'Koaeng’', 'Kosomok', 'Koang’wan', 'Komuut', 'Kolo'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/km_KH.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/km_KH.php index ef3b415e..92e5fdbd 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/km_KH.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/km_KH.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/km.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kn_IN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kn_IN.php index 7c6c9096..30e3d886 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kn_IN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/kn_IN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/kn.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ko_KP.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ko_KP.php index 55b40fa2..4ba802b3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ko_KP.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ko_KP.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ko.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ko_KR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ko_KR.php index d8eba2cb..9d873a27 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ko_KR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ko_KR.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ko.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksb.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksb.php index 424099dc..aaa00614 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksb.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksb.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['makeo', 'nyiaghuo'], 'weekdays' => ['Jumaapii', 'Jumaatatu', 'Jumaane', 'Jumaatano', 'Alhamisi', 'Ijumaa', 'Jumaamosi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksf.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksf.php index 8fb55989..84a59672 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksf.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksf.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['sĂĄrĂșwĂĄ', 'cɛɛ́nko'], 'weekdays' => ['sɔ́ndǝ', 'lǝndĂ­', 'maadĂ­', 'mɛkrɛdĂ­', 'jǝǝdĂ­', 'jĂșmbĂĄ', 'samdĂ­'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksh.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksh.php index 44c60a4d..95457e24 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksh.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ksh.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['v.M.', 'n.M.'], 'weekdays' => ['Sunndaach', 'Mohndaach', 'Dinnsdaach', 'Metwoch', 'Dunnersdaach', 'Friidaach', 'Samsdaach'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ku_TR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ku_TR.php index 11fce2d8..4243a82f 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ku_TR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ku_TR.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ku.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ky_KG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ky_KG.php index 4426bea4..9923a31e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ky_KG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ky_KG.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ky.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lag.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lag.php index dc959c96..f3f57f6a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lag.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lag.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['TOO', 'MUU'], 'weekdays' => ['JumapĂ­iri', 'JumatĂĄtu', 'JumaĂ­ne', 'JumatĂĄano', 'AlamĂ­isi', 'IjumĂĄa', 'JumamĂłosi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lb.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lb.php index db048342..7636655e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lb.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lb.php @@ -16,6 +16,9 @@ * - dan-nl * - Simon Lelorrain (slelorrain) */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count Joer', 'y' => ':countJ', @@ -57,7 +60,7 @@ return [ 'nextDay' => '[Muer um] LT', 'nextWeek' => 'dddd [um] LT', 'lastDay' => '[GĂ«schter um] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $date) { + 'lastWeek' => function (CarbonInterface $date) { // Different date string for 'DĂ«nschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule switch ($date->dayOfWeek) { case 2: diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lb_LU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lb_LU.php index c8625fe9..414bd4d0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lb_LU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lb_LU.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/lb.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lkt.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lkt.php index 968b0588..ae73a97b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lkt.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lkt.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'month' => ':count haƋwĂ­', // less reliable diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_AO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_AO.php index e244096c..7fdb7f1b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_AO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_AO.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ln.php', [ 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa mĂ­balĂ©', 'mokɔlɔ mwa mĂ­sĂĄto', 'mokɔlɔ ya mĂ­nĂ©i', 'mokɔlɔ ya mĂ­tĂĄno', 'mpɔ́sɔ'], 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_CF.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_CF.php index e244096c..7fdb7f1b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_CF.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_CF.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ln.php', [ 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa mĂ­balĂ©', 'mokɔlɔ mwa mĂ­sĂĄto', 'mokɔlɔ ya mĂ­nĂ©i', 'mokɔlɔ ya mĂ­tĂĄno', 'mpɔ́sɔ'], 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_CG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_CG.php index e244096c..7fdb7f1b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_CG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ln_CG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ln.php', [ 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa mĂ­balĂ©', 'mokɔlɔ mwa mĂ­sĂĄto', 'mokɔlɔ ya mĂ­nĂ©i', 'mokɔlɔ ya mĂ­tĂĄno', 'mpɔ́sɔ'], 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lo_LA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lo_LA.php index c0a1d6b4..9b7fd9bf 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lo_LA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lo_LA.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/lo.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lrc.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lrc.php index 10661bb0..546e6791 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lrc.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lrc.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'minute' => ':count Ù‡Ù†Ű±', // less reliable diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lrc_IQ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lrc_IQ.php index 449d8632..d42f5e97 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lrc_IQ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lrc_IQ.php @@ -8,5 +8,6 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/lrc.php', [ ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lt_LT.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lt_LT.php index c3087f4e..f772d38b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lt_LT.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lt_LT.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/lt.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lu.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lu.php index 8dab5417..c8cd83af 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lu.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lu.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Dinda', 'Dilolo'], 'weekdays' => ['Lumingu', 'Nkodya', 'NdĂ ayĂ ', 'NdangĂč', 'NjĂČwa', 'NgĂČvya', 'Lubingu'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/luo.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/luo.php index 201ca969..b55af731 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/luo.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/luo.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['OD', 'OT'], 'weekdays' => ['Jumapil', 'Wuok Tich', 'Tich Ariyo', 'Tich Adek', 'Tich Ang’wen', 'Tich Abich', 'Ngeso'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/luy.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/luy.php index 52191253..2b37e3e3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/luy.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/luy.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Jumapiri', 'Jumatatu', 'Jumanne', 'Jumatano', 'Murwa wa Kanne', 'Murwa wa Katano', 'Jumamosi'], 'weekdays_short' => ['J2', 'J3', 'J4', 'J5', 'Al', 'Ij', 'J1'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lv.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lv.php index 724b58df..693eceb5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lv.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lv.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Carbon\CarbonInterface; /** @@ -168,6 +177,6 @@ return [ 'weekdays_short' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'], 'weekdays_min' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'], 'months' => ['janvārÄ«', 'februārÄ«', 'martā', 'aprÄ«lÄ«', 'maijā', 'jĆ«nijā', 'jĆ«lijā', 'augustā', 'septembrÄ«', 'oktobrÄ«', 'novembrÄ«', 'decembrÄ«'], - 'months_short' => ['Janv', 'Feb', 'Mar', 'Apr', 'Mai', 'JĆ«n', 'JĆ«l', 'Aug', 'Sept', 'Okt', 'Nov', 'Dec'], + 'months_short' => ['janv.', 'febr.', 'martā', 'apr.', 'maijā', 'jĆ«n.', 'jĆ«l.', 'aug.', 'sept.', 'okt.', 'nov.', 'dec.'], 'meridiem' => ['priekĆĄpusdiena', 'pēcpusdiena'], ]; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lv_LV.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lv_LV.php index 46c0f430..ee91c369 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lv_LV.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/lv_LV.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/lv.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mas.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mas.php index 723ae67e..cbd610c2 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mas.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mas.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['ƐnkakɛnyĂĄ', 'ƐndĂĄmĂą'], 'weekdays' => ['JumapĂ­lĂ­', 'JumatĂĄtu', 'Jumane', 'JumatĂĄnɔ', 'AlaĂĄmisi', 'JumĂĄa', 'JumamĂłsi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mas_TZ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mas_TZ.php index aa382b72..56e29053 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mas_TZ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mas_TZ.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/mas.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mer.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mer.php index cb7ba8d7..2e14597f 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mer.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mer.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['RĆš', 'ĆšG'], 'weekdays' => ['Kiumia', 'Muramuko', 'Wairi', 'Wethatu', 'Wena', 'Wetano', 'Jumamosi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mgh.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mgh.php index 65798a80..2a80960d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mgh.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mgh.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['wichishu', 'mchochil’l'], 'weekdays' => ['Sabato', 'Jumatatu', 'Jumanne', 'Jumatano', 'Arahamisi', 'Ijumaa', 'Jumamosi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mgo.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mgo.php index a5a07543..a126c9ff 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mgo.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mgo.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Aneg 1', 'Aneg 2', 'Aneg 3', 'Aneg 4', 'Aneg 5', 'Aneg 6', 'Aneg 7'], 'weekdays_short' => ['Aneg 1', 'Aneg 2', 'Aneg 3', 'Aneg 4', 'Aneg 5', 'Aneg 6', 'Aneg 7'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mi_NZ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mi_NZ.php index 123d2292..6b964e3a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mi_NZ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mi_NZ.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/mi.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/miq_NI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/miq_NI.php index b56783ee..57faa318 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/miq_NI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/miq_NI.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'formats' => [ 'L' => 'DD/MM/YY', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mk.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mk.php index 853bc96d..d822de09 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mk.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mk.php @@ -19,6 +19,9 @@ * - JD Isaacks * - Tomi Atanasoski */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count ĐłĐŸĐŽĐžĐœĐ°|:count ĐłĐŸĐŽĐžĐœĐž', 'a_year' => 'ĐłĐŸĐŽĐžĐœĐ°|:count ĐłĐŸĐŽĐžĐœĐž', @@ -65,7 +68,7 @@ return [ 'nextDay' => '[УтрД ĐČĐŸ] LT', 'nextWeek' => '[Đ’ĐŸ] dddd [ĐČĐŸ] LT', 'lastDay' => '[ВчДра ĐČĐŸ] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $date) { + 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: case 3: diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mk_MK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mk_MK.php index 06ff7d9d..95e2ff9c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mk_MK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mk_MK.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/mk.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ml_IN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ml_IN.php index 20878dce..000e7958 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ml_IN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ml_IN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ml.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mn.php index 25f65b33..717d199b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mn.php @@ -5,11 +5,8 @@ * * (c) Brian Nesbitt * - * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. - * - * @translator Batmandakh Erdenebileg */ /* diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mn_MN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mn_MN.php index b8fef24c..e5ce426c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mn_MN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mn_MN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/mn.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mo.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mo.php index dd7c8f09..102afcde 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mo.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mo.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ro.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mr_IN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mr_IN.php index 556cefa2..7bca919f 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mr_IN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mr_IN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/mr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms.php index ed7d48f8..36934eeb 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms.php @@ -75,12 +75,18 @@ return [ 'sameElse' => 'L', ], 'meridiem' => function ($hour) { + if ($hour < 1) { + return 'tengah malam'; + } + if ($hour < 12) { return 'pagi'; } - if ($hour < 15) { + + if ($hour < 13) { return 'tengah hari'; } + if ($hour < 19) { return 'petang'; } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms_BN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms_BN.php index ea2b453b..ef837a2d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms_BN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms_BN.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ms.php', [ 'formats' => [ 'LT' => 'h:mm a', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms_SG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms_SG.php index 097a168f..77cb83d2 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms_SG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ms_SG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ms.php', [ 'formats' => [ 'LT' => 'h:mm a', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mt_MT.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mt_MT.php index 6ec2b339..9534f687 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mt_MT.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mt_MT.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/mt.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mua.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mua.php index 8f1f9dcb..a3a3c6fd 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mua.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mua.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['comme', 'lilli'], 'weekdays' => ['Com’yakke', 'Comlaaɗii', 'Comzyiiɗii', 'Comkolle', 'Comkaldǝɓlii', 'Comgaisuu', 'Comzyeɓsuu'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/my_MM.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/my_MM.php index 1f27ccae..a0108dd4 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/my_MM.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/my_MM.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/my.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mzn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mzn.php index 6ad36042..70f5f23c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mzn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/mzn.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fa.php', [ 'months' => ['Ú˜Ű§Ù†ÙˆÛŒÙ‡', 'ÙÙˆŰ±ÛŒÙ‡', 'Ù…Ű§Ű±Űł', 'ŰąÙˆŰ±ÛŒÙ„', 'مه', 'Ú˜ÙˆŰŠÙ†', 'Ú˜ÙˆŰŠÛŒÙ‡', 'Ű§ÙˆŰȘ', 'ŰłÙŸŰȘŰ§Ù…ŰšŰ±', 'ۧکŰȘۚ۱', 'Ù†ÙˆŰ§Ù…ŰšŰ±', 'ŰŻŰłŰ§Ù…ŰšŰ±'], 'months_short' => ['Ú˜Ű§Ù†ÙˆÛŒÙ‡', 'ÙÙˆŰ±ÛŒÙ‡', 'Ù…Ű§Ű±Űł', 'ŰąÙˆŰ±ÛŒÙ„', 'مه', 'Ú˜ÙˆŰŠÙ†', 'Ú˜ÙˆŰŠÛŒÙ‡', 'Ű§ÙˆŰȘ', 'ŰłÙŸŰȘŰ§Ù…ŰšŰ±', 'ۧکŰȘۚ۱', 'Ù†ÙˆŰ§Ù…ŰšŰ±', 'ŰŻŰłŰ§Ù…ŰšŰ±'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/naq.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/naq.php index 614ced43..fbd9be91 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/naq.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/naq.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['ǁgoagas', 'ǃuias'], 'weekdays' => ['Sontaxtsees', 'Mantaxtsees', 'Denstaxtsees', 'Wunstaxtsees', 'Dondertaxtsees', 'Fraitaxtsees', 'Satertaxtsees'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nb_NO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nb_NO.php index bd643a8e..31678c53 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nb_NO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nb_NO.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/nb.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nb_SJ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nb_SJ.php index 93cbaef1..ce0210bc 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nb_SJ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nb_SJ.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/nb.php', [ 'formats' => [ 'LL' => 'D. MMM YYYY', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nd.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nd.php index d6fdaad3..f75d9a71 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nd.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nd.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Sonto', 'Mvulo', 'Sibili', 'Sithathu', 'Sine', 'Sihlanu', 'Mgqibelo'], 'weekdays_short' => ['Son', 'Mvu', 'Sib', 'Sit', 'Sin', 'Sih', 'Mgq'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nds_DE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nds_DE.php index eb6e77e6..a6c57a91 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nds_DE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nds_DE.php @@ -20,36 +20,41 @@ return array_replace_recursive(require __DIR__.'/en.php', [ 'months' => ['Jannuaar', 'Feberwaar', 'MĂ€rz', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], 'months_short' => ['Jan', 'Feb', 'MĂ€r', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], 'weekdays' => ['SĂŒnndag', 'Maandag', 'Dingsdag', 'Middeweek', 'Dunnersdag', 'Freedag', 'SĂŒnnavend'], - 'weekdays_short' => ['Sdag', 'Maan', 'Ding', 'Migg', 'Dunn', 'Free', 'Svd.'], - 'weekdays_min' => ['Sdag', 'Maan', 'Ding', 'Migg', 'Dunn', 'Free', 'Svd.'], + 'weekdays_short' => ['Sdag', 'Maan', 'Ding', 'Midd', 'Dunn', 'Free', 'Svd.'], + 'weekdays_min' => ['Sd', 'Ma', 'Di', 'Mi', 'Du', 'Fr', 'Sa'], 'first_day_of_week' => 1, 'day_of_first_week_of_year' => 4, 'year' => ':count Johr', - 'y' => ':count Johr', - 'a_year' => ':count Johr', + 'y' => ':countJ', + 'a_year' => '{1}een Johr|:count Johr', 'month' => ':count Maand', - 'm' => ':count Maand', - 'a_month' => ':count Maand', + 'm' => ':countM', + 'a_month' => '{1}een Maand|:count Maand', - 'week' => ':count Week', - 'w' => ':count Week', - 'a_week' => ':count Week', + 'week' => ':count Week|:count Weken', + 'w' => ':countW', + 'a_week' => '{1}een Week|:count Week|:count Weken', - 'day' => ':count Dag', - 'd' => ':count Dag', - 'a_day' => ':count Dag', + 'day' => ':count Dag|:count Daag', + 'd' => ':countD', + 'a_day' => '{1}een Dag|:count Dag|:count Daag', - 'hour' => ':count StĂŒnn', - 'h' => ':count StĂŒnn', - 'a_hour' => ':count StĂŒnn', + 'hour' => ':count StĂŒnn|:count StĂŒnnen', + 'h' => ':countSt', + 'a_hour' => '{1}een StĂŒnn|:count StĂŒnn|:count StĂŒnnen', - 'minute' => ':count Minuut', - 'min' => ':count Minuut', - 'a_minute' => ':count Minuut', + 'minute' => ':count Minuut|:count Minuten', + 'min' => ':countm', + 'a_minute' => '{1}een Minuut|:count Minuut|:count Minuten', - 'second' => ':count sekunn', - 's' => ':count sekunn', - 'a_second' => ':count sekunn', + 'second' => ':count Sekunn|:count Sekunnen', + 's' => ':counts', + 'a_second' => 'en poor Sekunnen|:count Sekunn|:count Sekunnen', + + 'ago' => 'vör :time', + 'from_now' => 'in :time', + 'before' => ':time vörher', + 'after' => ':time later', ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ne_IN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ne_IN.php index 2583bcf8..f68d00e3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ne_IN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ne_IN.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ne.php', [ 'formats' => [ 'LT' => 'h:mm a', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ne_NP.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ne_NP.php index 38caa1e5..27840c0f 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ne_NP.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ne_NP.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ne.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl.php index fc8b5d9a..2d737703 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl.php @@ -71,9 +71,9 @@ return [ 'period_recurrences' => ':count keer', 'period_interval' => function (string $interval = '') { /** @var string $output */ - $output = preg_replace('/^(een|één|1)\s+/', '', $interval); + $output = preg_replace('/^(een|één|1)\s+/u', '', $interval); - if (preg_match('/^(een|één|1)( jaar|j| uur|u)/', $interval)) { + if (preg_match('/^(een|één|1)( jaar|j| uur|u)/u', $interval)) { return "elk $output"; } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_BQ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_BQ.php index 521d2d69..c269197b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_BQ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_BQ.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/nl.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_CW.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_CW.php index 521d2d69..c269197b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_CW.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_CW.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/nl.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_SR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_SR.php index 521d2d69..c269197b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_SR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_SR.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/nl.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_SX.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_SX.php index 521d2d69..c269197b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_SX.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nl_SX.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/nl.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nmg.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nmg.php index f8850e29..4d1df6e5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nmg.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nmg.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['manĂĄ', 'kugĂș'], 'weekdays' => ['sɔ́ndɔ', 'mɔ́ndɔ', 'sɔ́ndɔ mafĂș mĂĄba', 'sɔ́ndɔ mafĂș mĂĄlal', 'sɔ́ndɔ mafĂș mĂĄna', 'mabĂĄgĂĄ mĂĄ sukul', 'sĂĄsadi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nn_NO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nn_NO.php index ebbe0b78..8e168711 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nn_NO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nn_NO.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/nn.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nnh.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nnh.php index fa6a448e..007d2399 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nnh.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nnh.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['mbaÊŒĂĄmbaÊŒ', 'ncwĂČnzĂ©m'], 'weekdays' => null, diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nus.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nus.php index 033e9756..789bc391 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nus.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nus.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['RW', 'TÊ'], 'weekdays' => ['CÀƋ kuɔth', 'Jiec la̱t', 'Rɛw lĂ€tni', 'Diɔ̱k lĂ€tni', 'Êuaan lĂ€tni', 'Dhieec lĂ€tni', 'BĂ€kɛl lĂ€tni'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nyn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nyn.php index fdc2ff46..8660ea42 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nyn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/nyn.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Sande', 'Orwokubanza', 'Orwakabiri', 'Orwakashatu', 'Orwakana', 'Orwakataano', 'Orwamukaaga'], 'weekdays_short' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/oc.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/oc.php index 94c3e04c..89693e67 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/oc.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/oc.php @@ -14,8 +14,10 @@ * - QuentĂ­ */ // @codeCoverageIgnoreStart +use Symfony\Component\Translation\PluralizationRules; + if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { - \Symfony\Component\Translation\PluralizationRules::set(function ($number) { + PluralizationRules::set(function ($number) { return $number == 1 ? 0 : 1; }, 'oc'); } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/oc_FR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/oc_FR.php index fde859fd..01eb5c14 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/oc_FR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/oc_FR.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/oc.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/om_ET.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/om_ET.php index 46483439..044760e3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/om_ET.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/om_ET.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/om.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/om_KE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/om_KE.php index b29a40fb..f5a4d1c9 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/om_KE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/om_KE.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/om.php', [ 'day_of_first_week_of_year' => 0, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pa_Arab.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pa_Arab.php index 8b04dee2..39b06532 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pa_Arab.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pa_Arab.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ur.php', [ 'weekdays' => ['ۧŰȘÙˆŰ§Ű±', 'ÙŸÛŒŰ±', 'Ù…Ù†ÚŻÙ„', 'ŰšÙŰŻÚŸ', 'ŰŹÙ…Űč۱ۧŰȘ', 'ŰŹÙ…Űčہ', 'ہفŰȘہ'], 'weekdays_short' => ['ۧŰȘÙˆŰ§Ű±', 'ÙŸÛŒŰ±', 'Ù…Ù†ÚŻÙ„', 'ŰšÙŰŻÚŸ', 'ŰŹÙ…Űč۱ۧŰȘ', 'ŰŹÙ…Űčہ', 'ہفŰȘہ'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pa_Guru.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pa_Guru.php index c0d35ecb..7adff5c3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pa_Guru.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pa_Guru.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/pa.php', [ 'formats' => [ 'LT' => 'h:mm a', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pl.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pl.php index ca10fe4a..f0196c0d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pl.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pl.php @@ -25,7 +25,11 @@ * - Peter (UnrulyNatives) * - Qrzysio * - Jan (aso824) + * - diverpl */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count rok|:count lata|:count lat', 'a_year' => 'rok|:count lata|:count lat', @@ -44,12 +48,18 @@ return [ 'h' => ':count godz.', 'minute' => ':count minuta|:count minuty|:count minut', 'a_minute' => 'minuta|:count minuty|:count minut', - 'min' => ':count min.', + 'min' => ':count min', 'second' => ':count sekunda|:count sekundy|:count sekund', 'a_second' => '{1}kilka sekund|:count sekunda|:count sekundy|:count sekund', 's' => ':count sek.', 'ago' => ':time temu', - 'from_now' => 'za :time', + 'from_now' => static function ($time) { + return 'za '.strtr($time, [ + 'godzina' => 'godzinę', + 'minuta' => 'minutę', + 'sekunda' => 'sekundę', + ]); + }, 'after' => ':time po', 'before' => ':time przed', 'diff_now' => 'przed chwilą', @@ -72,7 +82,7 @@ return [ 'calendar' => [ 'sameDay' => '[Dziƛ o] LT', 'nextDay' => '[Jutro o] LT', - 'nextWeek' => function (\Carbon\CarbonInterface $date) { + 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[W niedzielę o] LT'; @@ -87,7 +97,7 @@ return [ } }, 'lastDay' => '[Wczoraj o] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $date) { + 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[W zeszƂą niedzielę o] LT'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pl_PL.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pl_PL.php index 69cd6976..222bcdb4 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pl_PL.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pl_PL.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/pl.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/prg.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/prg.php index d0fd2f0d..6e63f4ad 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/prg.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/prg.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ps_AF.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ps_AF.php index e63121e3..6ec51804 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ps_AF.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ps_AF.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ps.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt.php index e36ca4c3..0af89499 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt.php @@ -23,6 +23,9 @@ * - Sebastian Thierer * - Claudson Martins (claudsonm) */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count ano|:count anos', 'a_year' => 'um ano|:count anos', @@ -81,7 +84,7 @@ return [ 'nextDay' => '[AmanhĂŁ Ă s] LT', 'nextWeek' => 'dddd [Ă s] LT', 'lastDay' => '[Ontem Ă s] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $date) { + 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: case 6: diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_AO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_AO.php index 3d13bca6..22c01ec5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_AO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_AO.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/pt.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_CH.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_CH.php index 3d13bca6..22c01ec5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_CH.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_CH.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/pt.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_CV.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_CV.php index 3d13bca6..22c01ec5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_CV.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_CV.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/pt.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_GQ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_GQ.php index 3d13bca6..22c01ec5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_GQ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_GQ.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/pt.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_GW.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_GW.php index 3d13bca6..22c01ec5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_GW.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_GW.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/pt.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_LU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_LU.php index 3d13bca6..22c01ec5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_LU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_LU.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/pt.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_MO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_MO.php index 331fa5cc..f2b5eab7 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_MO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_MO.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/pt.php', [ 'formats' => [ 'LT' => 'h:mm a', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_MZ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_MZ.php index 93bac23d..fbc0c97b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_MZ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_MZ.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/pt.php', [ 'first_day_of_week' => 0, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_ST.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_ST.php index 3d13bca6..22c01ec5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_ST.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_ST.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/pt.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_TL.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_TL.php index 3d13bca6..22c01ec5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_TL.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/pt_TL.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/pt.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu.php index 5f3a3924..65278cd1 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/es_UY.php', [ 'formats' => [ 'LT' => 'HH:mm', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu_BO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu_BO.php index 91635d59..d5db6bf5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu_BO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu_BO.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/qu.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu_EC.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu_EC.php index 91635d59..d5db6bf5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu_EC.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/qu_EC.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/qu.php', [ 'first_day_of_week' => 1, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rn.php index 637d4e5e..8ab958eb 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rn.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Z.MU.', 'Z.MW.'], 'weekdays' => ['Ku w’indwi', 'Ku wa mbere', 'Ku wa kabiri', 'Ku wa gatatu', 'Ku wa kane', 'Ku wa gatanu', 'Ku wa gatandatu'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ro_MD.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ro_MD.php index 0ba6f68a..ad1d2fa8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ro_MD.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ro_MD.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ro.php', [ 'formats' => [ 'LT' => 'HH:mm', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ro_RO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ro_RO.php index dd7c8f09..102afcde 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ro_RO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ro_RO.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ro.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rof.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rof.php index 80ab454f..205fc266 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rof.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rof.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['kang’ama', 'kingoto'], 'weekdays' => ['Ijumapili', 'Ijumatatu', 'Ijumanne', 'Ijumatano', 'Alhamisi', 'Ijumaa', 'Ijumamosi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru.php index 93e0e01b..673b043b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru.php @@ -35,6 +35,9 @@ * - Vladislav UnsealedOne * - dima-bzz */ + +use Carbon\CarbonInterface; + $transformDiff = function ($input) { return strtr($input, [ 'ĐœĐ”ĐŽĐ”Đ»Ń' => 'ĐœĐ”ĐŽĐ”Đ»ŃŽ', @@ -97,7 +100,7 @@ return [ 'calendar' => [ 'sameDay' => '[ĐĄĐ”ĐłĐŸĐŽĐœŃ, ĐČ] LT', 'nextDay' => '[ЗаĐČтра, ĐČ] LT', - 'nextWeek' => function (\Carbon\CarbonInterface $current, \Carbon\CarbonInterface $other) { + 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { if ($current->week !== $other->week) { switch ($current->dayOfWeek) { case 0: @@ -120,7 +123,7 @@ return [ return '[В] dddd, [ĐČ] LT'; }, 'lastDay' => '[ВчДра, ĐČ] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $current, \Carbon\CarbonInterface $other) { + 'lastWeek' => function (CarbonInterface $current, CarbonInterface $other) { if ($current->week !== $other->week) { switch ($current->dayOfWeek) { case 0: diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_BY.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_BY.php index 2c8d78f8..8ca7df34 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_BY.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_BY.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ru.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_KG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_KG.php index 2c8d78f8..8ca7df34 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_KG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_KG.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ru.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_KZ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_KZ.php index 2c8d78f8..8ca7df34 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_KZ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_KZ.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ru.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_MD.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_MD.php index 2c8d78f8..8ca7df34 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_MD.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_MD.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ru.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_RU.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_RU.php index 2c8d78f8..8ca7df34 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_RU.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ru_RU.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ru.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rwk.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rwk.php index f8cc72c1..ed92e8e7 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rwk.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/rwk.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['utuko', 'kyiukonyi'], 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/saq.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/saq.php index eebfac99..ff8bf604 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/saq.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/saq.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Tesiran', 'Teipa'], 'weekdays' => ['Mderot ee are', 'Mderot ee kuni', 'Mderot ee ong’wan', 'Mderot ee inet', 'Mderot ee ile', 'Mderot ee sapa', 'Mderot ee kwe'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sbp.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sbp.php index 9b737837..e29ca379 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sbp.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sbp.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Lwamilawu', 'Pashamihe'], 'weekdays' => ['Mulungu', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alahamisi', 'Ijumaa', 'Jumamosi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sd.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sd.php index ad8c0009..0022c5a9 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sd.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sd.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + $months = [ 'ŰŹÙ†ÙˆŰ±ÙŠ', 'ÙÙŠŰšŰ±ÙˆŰ±ÙŠ', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_FI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_FI.php index b2b967ea..cf01805d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_FI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_FI.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/se.php', [ 'formats' => [ 'LT' => 'HH:mm', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_NO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_NO.php index 83bbf78b..177c7e94 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_NO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_NO.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/se.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_SE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_SE.php index 83bbf78b..177c7e94 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_SE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/se_SE.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/se.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/seh.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/seh.php index 3ad889ab..babf9afb 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/seh.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/seh.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['Dimingu', 'Chiposi', 'Chipiri', 'Chitatu', 'Chinai', 'Chishanu', 'Sabudu'], 'weekdays_short' => ['Dim', 'Pos', 'Pir', 'Tat', 'Nai', 'Sha', 'Sab'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ses.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ses.php index 9355184f..e1099e65 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ses.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ses.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Adduha', 'Aluula'], 'weekdays' => ['Alhadi', 'Atinni', 'Atalaata', 'Alarba', 'Alhamiisa', 'Alzuma', 'Asibti'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sg.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sg.php index 7f8e9daf..9264e893 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sg.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sg.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['ND', 'LK'], 'weekdays' => ['Bikua-ĂŽko', 'BĂŻkua-Ă»se', 'BĂŻkua-ptĂą', 'BĂŻkua-usïö', 'BĂŻkua-okĂŒ', 'LĂąpĂŽsö', 'LĂąyenga'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sh.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sh.php index a953df42..e4aa5a1c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sh.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sh.php @@ -8,9 +8,12 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + // @codeCoverageIgnoreStart +use Symfony\Component\Translation\PluralizationRules; + if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { - \Symfony\Component\Translation\PluralizationRules::set(function ($number) { + PluralizationRules::set(function ($number) { return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); }, 'sh'); } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi.php index ee5aa0bc..78151869 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['â”œâ”‰âŽŒâŽ°â”Ąâ”œ', 'â”œâŽ°âŽ·âŽłâŽłâ”ŻâŽ°â”œ'], 'weekdays' => ['⎰┙⎰┎⎰┙', 'âŽ°â”ąâ”âŽ°â”™', '⎰┙┉┏⎰┙', '⎰⎜┕⎰┙', 'âŽ°âŽœâ”ĄâŽ°â”™', '┙┉┎┥⎰┙', '⎰┙┉âŽč┹⎰┙'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi_Latn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi_Latn.php index a5580c30..cddfb242 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi_Latn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi_Latn.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/shi.php', [ 'meridiem' => ['tifawt', 'tadggÊ·at'], 'weekdays' => ['asamas', 'aynas', 'asinas', 'akáč›as', 'akwas', 'asimwas', 'asiឍyas'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi_Tfng.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi_Tfng.php index e51ed130..f3df1f2c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi_Tfng.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/shi_Tfng.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/shi.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/si.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/si.php index 289d4d57..636bf691 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/si.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/si.php @@ -33,7 +33,7 @@ return [ 'a_second' => '{1}à¶­à¶­à·Šà¶Žà¶» à¶šà·’à·„à·’à¶Žà¶șකට|à¶­à¶­à·Šà¶Žà¶» :count', 'ago' => ':time කට ඎෙර', 'from_now' => function ($time) { - if (preg_match('/à¶Żà·’à¶± \d+/', $time)) { + if (preg_match('/à¶Żà·’à¶± \d/u', $time)) { return $time.' න්'; } @@ -41,7 +41,7 @@ return [ }, 'before' => ':time කට ඎෙර', 'after' => function ($time) { - if (preg_match('/à¶Żà·’à¶± \d+/', $time)) { + if (preg_match('/à¶Żà·’à¶± \d/u', $time)) { return $time.' න්'; } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/si_LK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/si_LK.php index 6c5be974..81c44e0e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/si_LK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/si_LK.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/si.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sk_SK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sk_SK.php index be3d1f24..0515601a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sk_SK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sk_SK.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/sk.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sl.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sl.php index 56d0f1bf..2e197212 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sl.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sl.php @@ -29,6 +29,9 @@ * - Lovro TramĆĄek (Lovro1107) * - burut13 */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count leto|:count leti|:count leta|:count let', 'y' => ':count leto|:count leti|:count leta|:count let', @@ -96,7 +99,7 @@ return [ 'nextDay' => '[jutri ob] LT', 'nextWeek' => 'dddd [ob] LT', 'lastDay' => '[včeraj ob] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $date) { + 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[preteklo] [nedeljo] [ob] LT'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sl_SI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sl_SI.php index da9fef05..5dad8c81 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sl_SI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sl_SI.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/sl.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/smn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/smn.php index b252ebbd..20add023 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/smn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/smn.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['ip.', 'ep.'], 'weekdays' => ['pasepeeivi', 'vuossaargĂą', 'majebaargĂą', 'koskoho', 'tuorĂąstuv', 'vĂĄstuppeeivi', 'lĂĄvurduv'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sn.php index 62c82b10..4f25028a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sn.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['a', 'p'], 'weekdays' => ['Svondo', 'Muvhuro', 'Chipiri', 'Chitatu', 'China', 'Chishanu', 'Mugovera'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_AL.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_AL.php index 0bfbdf3a..ea5df3f2 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_AL.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_AL.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/sq.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_MK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_MK.php index c844fe0d..62f752c4 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_MK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_MK.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/sq.php', [ 'formats' => [ 'L' => 'D.M.YYYY', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_XK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_XK.php index c844fe0d..62f752c4 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_XK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sq_XK.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/sq.php', [ 'formats' => [ 'L' => 'D.M.YYYY', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr.php index 6ecf2d02..68ba663a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr.php @@ -19,6 +19,9 @@ * - Glavić * - Milos Sakovic */ + +use Carbon\CarbonInterface; + return [ 'year' => ':count godina|:count godine|:count godina', 'y' => ':count g.', @@ -64,7 +67,7 @@ return [ 'calendar' => [ 'sameDay' => '[danas u] LT', 'nextDay' => '[sutra u] LT', - 'nextWeek' => function (\Carbon\CarbonInterface $date) { + 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[u nedelju u] LT'; @@ -77,7 +80,7 @@ return [ } }, 'lastDay' => '[juče u] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $date) { + 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[proĆĄle nedelje u] LT'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php index 85407423..c09df19c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php @@ -20,6 +20,9 @@ * - Nikola Zeravcic * - Milos Sakovic */ + +use Carbon\CarbonInterface; + return [ 'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count ĐłĐŸĐŽĐžĐœĐ”|[0,Inf[:count ĐłĐŸĐŽĐžĐœĐ°', 'y' => ':count Đł.', @@ -63,7 +66,7 @@ return [ 'calendar' => [ 'sameDay' => '[ĐŽĐ°ĐœĐ°Ń у] LT', 'nextDay' => '[сутра у] LT', - 'nextWeek' => function (\Carbon\CarbonInterface $date) { + 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[у ĐœĐ”ĐŽĐ”Ń™Ńƒ у] LT'; @@ -76,7 +79,7 @@ return [ } }, 'lastDay' => '[Ń˜ŃƒŃ‡Đ” у] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $date) { + 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[ĐżŃ€ĐŸŃˆĐ»Đ” ĐœĐ”ĐŽĐ”Ń™Đ” у] LT'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_BA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_BA.php index 36405d38..0fb63d76 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_BA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_BA.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/sr_Cyrl.php', [ 'formats' => [ 'LT' => 'HH:mm', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php index fb6179ee..d13229ab 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php @@ -14,6 +14,9 @@ * - Glavić * - Milos Sakovic */ + +use Carbon\CarbonInterface; + return [ 'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count ĐłĐŸĐŽĐžĐœĐ”|[0,Inf[:count ĐłĐŸĐŽĐžĐœĐ°', 'y' => ':count Đł.', @@ -60,7 +63,7 @@ return [ 'calendar' => [ 'sameDay' => '[ĐŽĐ°ĐœĐ°Ń у] LT', 'nextDay' => '[сутра у] LT', - 'nextWeek' => function (\Carbon\CarbonInterface $date) { + 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[у ĐœĐ”ĐŽĐ”Ń™Ńƒ у] LT'; @@ -73,7 +76,7 @@ return [ } }, 'lastDay' => '[Ń˜ŃƒŃ‡Đ” у] LT', - 'lastWeek' => function (\Carbon\CarbonInterface $date) { + 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[ĐżŃ€ĐŸŃˆĐ»Đ” ĐœĐ”ĐŽĐ”Ń™Đ” у] LT'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_XK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_XK.php index 0643a414..492baf0c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_XK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_XK.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/sr_Cyrl_BA.php', [ 'weekdays' => ['ĐœĐ”ĐŽĐ”Ń™Đ°', 'ĐżĐŸĐœĐ”ĐŽĐ”Ń™Đ°Đș', 'ŃƒŃ‚ĐŸŃ€Đ°Đș', 'срДЎа', 'чДтĐČртаĐș', 'пДтаĐș', 'ŃŃƒĐ±ĐŸŃ‚Đ°'], ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn.php index 8ae8c41a..99716747 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/sr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_BA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_BA.php index c25a5072..897c674a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_BA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_BA.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/sr_Latn.php', [ 'formats' => [ 'LT' => 'HH:mm', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php index de20f21c..e2133ef1 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php @@ -14,6 +14,9 @@ * - Glavić * - Milos Sakovic */ + +use Carbon\CarbonInterface; + return array_replace_recursive(require __DIR__.'/sr.php', [ 'month' => ':count mjesec|:count mjeseca|:count mjeseci', 'week' => ':count nedjelja|:count nedjelje|:count nedjelja', @@ -27,7 +30,7 @@ return array_replace_recursive(require __DIR__.'/sr.php', [ 'diff_tomorrow' => 'sjutra', 'calendar' => [ 'nextDay' => '[sjutra u] LT', - 'nextWeek' => function (\Carbon\CarbonInterface $date) { + 'nextWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[u nedjelju u] LT'; @@ -39,7 +42,7 @@ return array_replace_recursive(require __DIR__.'/sr.php', [ return '[u] dddd [u] LT'; } }, - 'lastWeek' => function (\Carbon\CarbonInterface $date) { + 'lastWeek' => function (CarbonInterface $date) { switch ($date->dayOfWeek) { case 0: return '[proĆĄle nedjelje u] LT'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_XK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_XK.php index ba7cc097..d0b9d10b 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_XK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_XK.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/sr_Latn_BA.php', [ 'weekdays' => ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'], ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php index b668ee1b..d7c65b91 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/sr_Latn_ME.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_RS@latin.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_RS@latin.php index 8ae8c41a..99716747 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_RS@latin.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sr_RS@latin.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/sr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ss_ZA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ss_ZA.php index 48d970ae..ba89527c 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ss_ZA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ss_ZA.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/ss.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_AX.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_AX.php index 56425b4e..70cc5585 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_AX.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_AX.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/sv.php', [ 'formats' => [ 'L' => 'YYYY-MM-dd', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_FI.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_FI.php index 1b73ecb2..d7182c83 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_FI.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_FI.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/sv.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_SE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_SE.php index 1b73ecb2..d7182c83 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_SE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sv_SE.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/sv.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sw_CD.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sw_CD.php index f6927f47..ec9117b5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sw_CD.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sw_CD.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/sw.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sw_UG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sw_UG.php index f6927f47..ec9117b5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sw_UG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/sw_UG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/sw.php', [ 'formats' => [ 'L' => 'DD/MM/YYYY', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/szl_PL.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/szl_PL.php index 4b0b5410..9adddcf8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/szl_PL.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/szl_PL.php @@ -33,9 +33,9 @@ return array_replace_recursive(require __DIR__.'/en.php', [ 'm' => ':count mjeƛƯnc', 'a_month' => ':count mjeƛƯnc', - 'week' => ':count TydĆșyƄ', - 'w' => ':count TydĆșyƄ', - 'a_week' => ':count TydĆșyƄ', + 'week' => ':count tydĆșyƄ', + 'w' => ':count tydĆșyƄ', + 'a_week' => ':count tydĆșyƄ', 'day' => ':count dĆșyƄ', 'd' => ':count dĆșyƄ', @@ -45,11 +45,11 @@ return array_replace_recursive(require __DIR__.'/en.php', [ 'h' => ':count godzina', 'a_hour' => ':count godzina', - 'minute' => ':count Minuta', - 'min' => ':count Minuta', - 'a_minute' => ':count Minuta', + 'minute' => ':count minuta', + 'min' => ':count minuta', + 'a_minute' => ':count minuta', - 'second' => ':count SekĆŻnda', - 's' => ':count SekĆŻnda', - 'a_second' => ':count SekĆŻnda', + 'second' => ':count sekĆŻnda', + 's' => ':count sekĆŻnda', + 'a_second' => ':count sekĆŻnda', ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ta_MY.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ta_MY.php index 291d6c81..a6cd8b51 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ta_MY.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ta_MY.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ta.php', [ 'formats' => [ 'LT' => 'a h:mm', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ta_SG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ta_SG.php index fe1cc062..7dbedeee 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ta_SG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ta_SG.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ta.php', [ 'formats' => [ 'LT' => 'a h:mm', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/te_IN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/te_IN.php index 6f81c405..3963f8d5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/te_IN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/te_IN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/te.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/teo.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/teo.php index 950235ea..ca30c37d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/teo.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/teo.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ta.php', [ 'meridiem' => ['Taparachu', 'Ebongi'], 'weekdays' => ['Nakaejuma', 'Nakaebarasa', 'Nakaare', 'Nakauni', 'Nakaung’on', 'Nakakany', 'Nakasabiti'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/teo_KE.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/teo_KE.php index 024d2729..010a04f5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/teo_KE.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/teo_KE.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/teo.php', [ 'first_day_of_week' => 0, ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tg_TJ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tg_TJ.php index c6591e34..badc7d1f 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tg_TJ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tg_TJ.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/tg.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/th_TH.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/th_TH.php index f11dc1b6..b9f94b2d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/th_TH.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/th_TH.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/th.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tr_CY.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tr_CY.php index 1937fec9..23f11449 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tr_CY.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tr_CY.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/tr.php', [ 'weekdays_short' => ['Paz', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt'], 'weekdays_min' => ['Pa', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tr_TR.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tr_TR.php index dc8e9358..9e994824 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tr_TR.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/tr_TR.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/tr.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/twq.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/twq.php index e8ff278c..5cbb46e0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/twq.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/twq.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/ses.php', [ 'meridiem' => ['Subbaahi', 'Zaarikay b'], ]); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uk.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uk.php index ab2d8678..b267b000 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uk.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uk.php @@ -8,7 +8,10 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ -$processHoursFunction = function (\Carbon\CarbonInterface $date, string $format) { + +use Carbon\CarbonInterface; + +$processHoursFunction = function (CarbonInterface $date, string $format) { return $format.'ĐŸ'.($date->hour === 11 ? 'б' : '').'] LT'; }; @@ -127,19 +130,19 @@ return [ 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', ], 'calendar' => [ - 'sameDay' => function (\Carbon\CarbonInterface $date) use ($processHoursFunction) { + 'sameDay' => function (CarbonInterface $date) use ($processHoursFunction) { return $processHoursFunction($date, '[ĐĄŃŒĐŸĐłĐŸĐŽĐœŃ– '); }, - 'nextDay' => function (\Carbon\CarbonInterface $date) use ($processHoursFunction) { + 'nextDay' => function (CarbonInterface $date) use ($processHoursFunction) { return $processHoursFunction($date, '[ЗаĐČтра '); }, - 'nextWeek' => function (\Carbon\CarbonInterface $date) use ($processHoursFunction) { + 'nextWeek' => function (CarbonInterface $date) use ($processHoursFunction) { return $processHoursFunction($date, '[ĐŁ] dddd ['); }, - 'lastDay' => function (\Carbon\CarbonInterface $date) use ($processHoursFunction) { + 'lastDay' => function (CarbonInterface $date) use ($processHoursFunction) { return $processHoursFunction($date, '[Đ’Ń‡ĐŸŃ€Đ° '); }, - 'lastWeek' => function (\Carbon\CarbonInterface $date) use ($processHoursFunction) { + 'lastWeek' => function (CarbonInterface $date) use ($processHoursFunction) { switch ($date->dayOfWeek) { case 0: case 3: @@ -183,17 +186,17 @@ return [ 'months_standalone' => ['ŃŃ–Ń‡Đ”ĐœŃŒ', 'лютОĐč', 'Đ±Đ”Ń€Đ”Đ·Đ”ĐœŃŒ', 'ĐșĐČŃ–Ń‚Đ”ĐœŃŒ', 'траĐČĐ”ĐœŃŒ', 'чДрĐČĐ”ĐœŃŒ', 'Đ»ĐžĐżĐ”ĐœŃŒ', 'ŃĐ”Ń€ĐżĐ”ĐœŃŒ', 'ĐČĐ”Ń€Đ”ŃĐ”ĐœŃŒ', 'Đ¶ĐŸĐČŃ‚Đ”ĐœŃŒ', 'Đ»ĐžŃŃ‚ĐŸĐżĐ°ĐŽ', 'ĐłŃ€ŃƒĐŽĐ”ĐœŃŒ'], 'months_short' => ['січ', 'лют', 'бДр', 'ĐșĐČі', 'тра', 'чДр', 'лОп', 'сДр', 'ĐČДр', 'Đ¶ĐŸĐČ', 'лОс', 'гру'], 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', - 'weekdays' => function (\Carbon\CarbonInterface $date, $format, $index) { + 'weekdays' => function (CarbonInterface $date, $format, $index) { static $words = [ 'nominative' => ['ĐœĐ”ĐŽŃ–Đ»Ń', 'ĐżĐŸĐœĐ”ĐŽŃ–Đ»ĐŸĐș', 'ĐČіĐČŃ‚ĐŸŃ€ĐŸĐș', 'сДрДЎа', 'чДтĐČДр', 'Đżâ€™ŃŃ‚ĐœĐžŃ†Ń', 'ŃŃƒĐ±ĐŸŃ‚Đ°'], 'accusative' => ['ĐœĐ”ĐŽŃ–Đ»ŃŽ', 'ĐżĐŸĐœĐ”ĐŽŃ–Đ»ĐŸĐș', 'ĐČіĐČŃ‚ĐŸŃ€ĐŸĐș', 'ŃĐ”Ń€Đ”ĐŽŃƒ', 'чДтĐČДр', 'Đżâ€™ŃŃ‚ĐœĐžŃ†ŃŽ', 'ŃŃƒĐ±ĐŸŃ‚Ńƒ'], 'genitive' => ['ĐœĐ”ĐŽŃ–Đ»Ń–', 'ĐżĐŸĐœĐ”ĐŽŃ–Đ»Đșа', 'ĐČіĐČŃ‚ĐŸŃ€Đșа', 'сДрДЎО', 'чДтĐČДрга', 'Đżâ€™ŃŃ‚ĐœĐžŃ†Ń–', 'ŃŃƒĐ±ĐŸŃ‚Đž'], ]; - $nounCase = preg_match('/(\[(В|ĐČ|ĐŁ|у)\])\s+dddd/', $format) + $nounCase = preg_match('/(\[(В|ĐČ|ĐŁ|у)\])\s+dddd/u', $format) ? 'accusative' : ( - preg_match('/\[?(?:ĐŒĐžĐœŃƒĐ»ĐŸŃ—|ĐœĐ°ŃŃ‚ŃƒĐżĐœĐŸŃ—)?\s*\]\s+dddd/', $format) + preg_match('/\[?(?:ĐŒĐžĐœŃƒĐ»ĐŸŃ—|ĐœĐ°ŃŃ‚ŃƒĐżĐœĐŸŃ—)?\s*\]\s+dddd/u', $format) ? 'genitive' : 'nominative' ); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uk_UA.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uk_UA.php index 5fc43171..bd11d86e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uk_UA.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uk_UA.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/uk.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ur.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ur.php index e55aff28..dc16c2c3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ur.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/ur.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + $months = [ 'ŰŹÙ†ÙˆŰ±ÛŒ', 'ÙŰ±ÙˆŰ±ÛŒ', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uz_Arab.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uz_Arab.php index 68719114..ffb51319 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uz_Arab.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uz_Arab.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/fa.php', [ 'weekdays' => ['ÛŒÚ©ŰŽÙ†ŰšÙ‡', 'ŰŻÙˆŰŽÙ†ŰšÙ‡', 'ŰłÙ‡â€ŒŰŽÙ†ŰšÙ‡', 'Ú†Ù‡Ű§Ű±ŰŽÙ†ŰšÙ‡', 'ÙŸÙ†ŰŹŰŽÙ†ŰšÙ‡', 'ŰŹÙ…Űčه', 'ŰŽÙ†ŰšÙ‡'], 'weekdays_short' => ['ی.', 'ŰŻ.', 'Űł.', 'چ.', 'ÙŸ.', 'ŰŹ.', 'ŰŽ.'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uz_Cyrl.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uz_Cyrl.php index e8754699..89e99718 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uz_Cyrl.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/uz_Cyrl.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/uz.php', [ 'formats' => [ 'L' => 'DD/MM/yy', diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai.php index 3e6fce2b..3c378dfb 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['ꕞꕌꔔ', 'ê—łê—Ąê˜‰', 'ꕚꕞꕚ', 'ꕉꕞꕒ', 'ê•‰ê”€ê•†ê•ą', 'ê•‰ê”€ê•€ê•ź', 'ê”»ê”Źê”ł'], 'weekdays_short' => ['ꕞꕌꔔ', 'ê—łê—Ąê˜‰', 'ꕚꕞꕚ', 'ꕉꕞꕒ', 'ê•‰ê”€ê•†ê•ą', 'ê•‰ê”€ê•€ê•ź', 'ê”»ê”Źê”ł'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai_Latn.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai_Latn.php index b76c4bcf..51e83cc5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai_Latn.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai_Latn.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'weekdays' => ['lahadi', 'tɛɛnɛɛ', 'talata', 'alaba', 'aimisa', 'aijima', 'siɓiti'], 'weekdays_short' => ['lahadi', 'tɛɛnɛɛ', 'talata', 'alaba', 'aimisa', 'aijima', 'siɓiti'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai_Vaii.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai_Vaii.php index 7b029a8a..b4bb533f 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai_Vaii.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vai_Vaii.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/vai.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vi_VN.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vi_VN.php index 77b2dce5..18d89876 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vi_VN.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vi_VN.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/vi.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vo.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vo.php index a956a783..e273033f 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vo.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vo.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vun.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vun.php index f8cc72c1..ed92e8e7 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vun.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/vun.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['utuko', 'kyiukonyi'], 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/xog.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/xog.php index 063977c0..eb55b4ab 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/xog.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/xog.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['Munkyo', 'Eigulo'], 'weekdays' => ['Sabiiti', 'Balaza', 'Owokubili', 'Owokusatu', 'Olokuna', 'Olokutaanu', 'Olomukaaga'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yav.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yav.php index e44cde62..225a20d8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yav.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yav.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/en.php', [ 'meridiem' => ['kiɛmɛ́ɛm', 'kisɛ́ndɛ'], 'weekdays' => ['sɔ́ndiɛ', 'mĂłndie', 'muĂĄnyáƋmĂłndie', 'metĂșkpĂ­ĂĄpɛ', 'kĂșpĂ©limetĂșkpiapɛ', 'felĂ©te', 'sĂ©selĂ©'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yo_BJ.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yo_BJ.php index f06bb99f..12b9e815 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yo_BJ.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yo_BJ.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return array_replace_recursive(require __DIR__.'/yo.php', [ 'meridiem' => ['Àárɔ̀', 'Ɔ̀sĂĄn'], 'weekdays' => ['Ɔjɔ́ ÀìkĂș', 'Ɔjɔ́ AjĂ©', 'Ɔjɔ́ Ìsɛ́gun', 'Ɔjɔ́rĂș', 'Ɔjɔ́bɔ', 'Ɔjɔ́ ƐtĂŹ', 'Ɔjɔ́ ÀbĂĄmɛ́ta'], diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yo_NG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yo_NG.php index 92934bcb..6860bc1a 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yo_NG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yo_NG.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/yo.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hans.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hans.php index 007d0716..db913caa 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hans.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hans.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/zh_Hans.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hant.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hant.php index 24797f96..e2526f13 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hant.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hant.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/zh_Hant.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_HK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_HK.php index 007d0716..db913caa 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_HK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_HK.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/zh_Hans.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_MO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_MO.php index 007d0716..db913caa 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_MO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_MO.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/zh_Hans.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_SG.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_SG.php index 007d0716..db913caa 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_SG.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_SG.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/zh_Hans.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_HK.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_HK.php index 24797f96..e2526f13 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_HK.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_HK.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/zh_Hant.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_MO.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_MO.php index 24797f96..e2526f13 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_MO.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_MO.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/zh_Hant.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_TW.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_TW.php index 24797f96..e2526f13 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_TW.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_TW.php @@ -8,4 +8,5 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + return require __DIR__.'/zh_Hant.php'; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Language.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Language.php index 37902854..1fb5bafd 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Language.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Language.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon; use JsonSerializable; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php index d71c888b..8be0569e 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Carbon\Laravel; use Carbon\Carbon; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php new file mode 100644 index 00000000..fc6fd2a7 --- /dev/null +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php @@ -0,0 +1,222 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\PHPStan; + +use Closure; +use PHPStan\Reflection\Php\BuiltinMethodReflection; +use PHPStan\TrinaryLogic; +use ReflectionClass; +use ReflectionFunction; +use ReflectionMethod; +use ReflectionParameter; +use ReflectionType; +use stdClass; +use Throwable; + +abstract class AbstractMacro implements BuiltinMethodReflection +{ + /** + * The reflection function/method. + * + * @var ReflectionFunction|ReflectionMethod + */ + protected $reflectionFunction; + + /** + * The class name. + * + * @var class-string + */ + private $className; + + /** + * The method name. + * + * @var string + */ + private $methodName; + + /** + * The parameters. + * + * @var ReflectionParameter[] + */ + private $parameters; + + /** + * The is static. + * + * @var bool + */ + private $static = false; + + /** + * Macro constructor. + * + * @param string $className + * @phpstan-param class-string $className + * + * @param string $methodName + * @param callable $macro + */ + public function __construct(string $className, string $methodName, $macro) + { + $this->className = $className; + $this->methodName = $methodName; + $this->reflectionFunction = \is_array($macro) + ? new ReflectionMethod($macro[0], $macro[1]) + : new ReflectionFunction($macro); + $this->parameters = $this->reflectionFunction->getParameters(); + + if ($this->reflectionFunction->isClosure()) { + try { + $closure = $this->reflectionFunction->getClosure(); + $boundClosure = Closure::bind($closure, new stdClass()); + $this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null); + } catch (Throwable $e) { + $this->static = true; + } + } + } + + /** + * {@inheritdoc} + */ + public function getDeclaringClass(): ReflectionClass + { + return new ReflectionClass($this->className); + } + + /** + * {@inheritdoc} + */ + public function isPrivate(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isPublic(): bool + { + return true; + } + + /** + * {@inheritdoc} + */ + public function isFinal(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isInternal(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isAbstract(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function isStatic(): bool + { + return $this->static; + } + + /** + * {@inheritdoc} + */ + public function getDocComment(): ?string + { + return $this->reflectionFunction->getDocComment() ?: null; + } + + /** + * {@inheritdoc} + */ + public function getName(): string + { + return $this->methodName; + } + + /** + * {@inheritdoc} + */ + public function getParameters(): array + { + return $this->parameters; + } + + /** + * {@inheritdoc} + */ + public function getReturnType(): ?ReflectionType + { + return $this->reflectionFunction->getReturnType(); + } + + /** + * {@inheritdoc} + */ + public function isDeprecated(): TrinaryLogic + { + return TrinaryLogic::createFromBoolean( + $this->reflectionFunction->isDeprecated() || + preg_match('/@deprecated/i', $this->getDocComment() ?: '') + ); + } + + /** + * {@inheritdoc} + */ + public function isVariadic(): bool + { + return $this->reflectionFunction->isVariadic(); + } + + /** + * {@inheritdoc} + */ + public function getPrototype(): BuiltinMethodReflection + { + return $this; + } + + /** + * {@inheritdoc} + */ + public function getReflection(): ?ReflectionMethod + { + return $this->reflectionFunction instanceof ReflectionMethod + ? $this->reflectionFunction + : null; + } + + public function getTentativeReturnType(): ?ReflectionType + { + return null; + } +} diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php index 7dab190c..83925873 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php @@ -2,232 +2,26 @@ declare(strict_types=1); +/** + * This file is part of the Carbon package. + * + * (c) Brian Nesbitt + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Carbon\PHPStan; -use Closure; use PHPStan\Reflection\Php\BuiltinMethodReflection; -use PHPStan\TrinaryLogic; -use ReflectionClass; -use ReflectionFunction; use ReflectionMethod; -use ReflectionParameter; -use ReflectionType; -use stdClass; -use Throwable; -final class Macro implements BuiltinMethodReflection +$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getFileName'); + +require $method->hasReturnType() + ? __DIR__.'/../../../lazy/Carbon/PHPStan/MacroStrongType.php' + : __DIR__.'/../../../lazy/Carbon/PHPStan/MacroWeakType.php'; + +final class Macro extends LazyMacro { - /** - * The class name. - * - * @var class-string - */ - private $className; - - /** - * The method name. - * - * @var string - */ - private $methodName; - - /** - * The reflection function/method. - * - * @var ReflectionFunction|ReflectionMethod - */ - private $reflectionFunction; - - /** - * The parameters. - * - * @var ReflectionParameter[] - */ - private $parameters; - - /** - * The is static. - * - * @var bool - */ - private $static = false; - - /** - * Macro constructor. - * - * @param string $className - * @phpstan-param class-string $className - * - * @param string $methodName - * @param callable $macro - */ - public function __construct(string $className, string $methodName, $macro) - { - $this->className = $className; - $this->methodName = $methodName; - $this->reflectionFunction = \is_array($macro) - ? new ReflectionMethod($macro[0], $macro[1]) - : new ReflectionFunction($macro); - $this->parameters = $this->reflectionFunction->getParameters(); - - if ($this->reflectionFunction->isClosure()) { - try { - /** @var Closure $closure */ - $closure = $this->reflectionFunction->getClosure(); - $boundClosure = Closure::bind($closure, new stdClass); - $this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null); - } catch (Throwable $e) { - $this->static = true; - } - } - } - - /** - * {@inheritdoc} - */ - public function getDeclaringClass(): ReflectionClass - { - return new ReflectionClass($this->className); - } - - /** - * {@inheritdoc} - */ - public function isPrivate(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isPublic(): bool - { - return true; - } - - /** - * {@inheritdoc} - */ - public function isFinal(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isInternal(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isAbstract(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isStatic(): bool - { - return $this->static; - } - - /** - * {@inheritdoc} - */ - public function getDocComment(): ?string - { - return $this->reflectionFunction->getDocComment() ?: null; - } - - /** - * {@inheritdoc} - */ - public function getFileName() - { - return $this->reflectionFunction->getFileName(); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return $this->methodName; - } - - /** - * {@inheritdoc} - */ - public function getParameters(): array - { - return $this->parameters; - } - - /** - * {@inheritdoc} - */ - public function getReturnType(): ?ReflectionType - { - return $this->reflectionFunction->getReturnType(); - } - - /** - * {@inheritdoc} - */ - public function getStartLine() - { - return $this->reflectionFunction->getStartLine(); - } - - /** - * {@inheritdoc} - */ - public function getEndLine() - { - return $this->reflectionFunction->getEndLine(); - } - - /** - * {@inheritdoc} - */ - public function isDeprecated(): TrinaryLogic - { - return TrinaryLogic::createFromBoolean( - $this->reflectionFunction->isDeprecated() || - preg_match('/@deprecated/i', $this->getDocComment() ?: '') - ); - } - - /** - * {@inheritdoc} - */ - public function isVariadic(): bool - { - return $this->reflectionFunction->isVariadic(); - } - - /** - * {@inheritdoc} - */ - public function getPrototype(): BuiltinMethodReflection - { - return $this; - } - - /** - * {@inheritdoc} - */ - public function getReflection(): ?ReflectionMethod - { - return $this->reflectionFunction instanceof ReflectionMethod - ? $this->reflectionFunction - : null; - } } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php index 5a3d6941..8e2524c0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Carbon\PHPStan; use PHPStan\Reflection\ClassReflection; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php index 97cf0b8e..d169939d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Carbon\PHPStan; use Carbon\CarbonInterface; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Boundaries.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Boundaries.php index 7fbb1a3f..71bbb723 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Boundaries.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Boundaries.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\Exceptions\UnknownUnitException; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Cast.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Cast.php index 44caf0b3..5f7c7c01 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Cast.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Cast.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Carbon\Traits; use Carbon\Exceptions\InvalidCastException; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php index ee00666c..a23e6ed0 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use BadMethodCallException; @@ -74,7 +75,7 @@ trait Comparison */ public function equalTo($date): bool { - return $this == $date; + return $this == $this->resolveCarbon($date); } /** @@ -154,7 +155,7 @@ trait Comparison */ public function greaterThan($date): bool { - return $this > $date; + return $this > $this->resolveCarbon($date); } /** @@ -255,7 +256,7 @@ trait Comparison */ public function lessThan($date): bool { - return $this < $date; + return $this < $this->resolveCarbon($date); } /** diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php index 7ba62256..8fe008a5 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\Carbon; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php index fa7cfc7b..f2adee5f 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\Carbon; @@ -94,7 +95,7 @@ trait Creator setlocale(LC_NUMERIC, $locale); } - static::setLastErrors(parent::getLastErrors()); + self::setLastErrors(parent::getLastErrors()); } /** @@ -338,7 +339,7 @@ trait Creator return $now(static::now($tz)); } - return $now; + return $now->avoidMutation()->tz($tz); } /** @@ -367,7 +368,7 @@ trait Creator */ public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) { - if (\is_string($year) && !is_numeric($year)) { + if (\is_string($year) && !is_numeric($year) || $year instanceof DateTimeInterface) { return static::parse($year, $tz ?: (\is_string($month) || $month instanceof DateTimeZone ? $month : null)); } @@ -389,12 +390,12 @@ trait Creator return $defaults[$unit]; }; - $year = $year === null ? $getDefault('year') : $year; - $month = $month === null ? $getDefault('month') : $month; - $day = $day === null ? $getDefault('day') : $day; - $hour = $hour === null ? $getDefault('hour') : $hour; - $minute = $minute === null ? $getDefault('minute') : $minute; - $second = (float) ($second === null ? $getDefault('second') : $second); + $year = $year ?? $getDefault('year'); + $month = $month ?? $getDefault('month'); + $day = $day ?? $getDefault('day'); + $hour = $hour ?? $getDefault('hour'); + $minute = $minute ?? $getDefault('minute'); + $second = (float) ($second ?? $getDefault('second')); self::assertBetween('month', $month, 0, 99); self::assertBetween('day', $day, 0, 99); @@ -931,6 +932,8 @@ trait Creator /** * {@inheritdoc} + * + * @return array */ #[ReturnTypeWillChange] public static function getLastErrors() diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Date.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Date.php index 07ac0dde..8c8af6fb 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Date.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Date.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use BadMethodCallException; @@ -38,6 +39,8 @@ use Throwable; /** * A simple API extension for DateTime. * + * @mixin DeprecatedProperties + * * * * @property int $year @@ -54,10 +57,6 @@ use Throwable; * @property string $shortEnglishDayOfWeek the abbreviated day of week in English * @property string $englishMonth the month in English * @property string $shortEnglishMonth the abbreviated month in English - * @property string $localeDayOfWeek the day of week in current locale LC_TIME - * @property string $shortLocaleDayOfWeek the abbreviated day of week in current locale LC_TIME - * @property string $localeMonth the month in current locale LC_TIME - * @property string $shortLocaleMonth the abbreviated month in current locale LC_TIME * @property int $milliseconds * @property int $millisecond * @property int $milli @@ -874,12 +873,28 @@ trait Date // @property string the abbreviated month in English 'shortEnglishMonth' => 'M', // @property string the day of week in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('MMM') instead. + // since: 2.55.0 'localeDayOfWeek' => '%A', // @property string the abbreviated day of week in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('dddd') instead. + // since: 2.55.0 'shortLocaleDayOfWeek' => '%a', // @property string the month in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('ddd') instead. + // since: 2.55.0 'localeMonth' => '%B', // @property string the abbreviated month in current locale LC_TIME + // @deprecated + // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. + // replacement: Use ->isoFormat('MMMM') instead. + // since: 2.55.0 'shortLocaleMonth' => '%b', // @property-read string $timezoneAbbreviatedName the current timezone abbreviated name 'timezoneAbbreviatedName' => 'T', @@ -1572,7 +1587,13 @@ trait Date #[ReturnTypeWillChange] public function setTimezone($value) { - return parent::setTimezone(static::safeCreateDateTimeZone($value)); + $tz = static::safeCreateDateTimeZone($value); + + if ($tz === false && !self::isStrictModeEnabled()) { + $tz = new CarbonTimeZone(); + } + + return parent::setTimezone($tz); } /** @@ -1584,10 +1605,11 @@ trait Date */ public function shiftTimezone($value) { - $offset = $this->offset; - $date = $this->setTimezone($value); + $dateTimeString = $this->format('Y-m-d H:i:s.u'); - return $date->addRealMicroseconds(($offset - $date->offset) * static::MICROSECONDS_PER_SECOND); + return $this + ->setTimezone($value) + ->modify($dateTimeString); } /** @@ -1672,7 +1694,7 @@ trait Date public static function getWeekStartsAt() { if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { - return static::getFirstDayOfWeek(); + return self::getFirstDayOfWeek(); } return static::$weekStartsAt; @@ -1703,7 +1725,7 @@ trait Date public static function getWeekEndsAt() { if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { - return (int) (static::DAYS_PER_WEEK - 1 + static::getFirstDayOfWeek()) % static::DAYS_PER_WEEK; + return (int) (static::DAYS_PER_WEEK - 1 + self::getFirstDayOfWeek()) % static::DAYS_PER_WEEK; } return static::$weekEndsAt; @@ -1811,6 +1833,10 @@ trait Date * Format the instance with the current locale. You can set the current * locale using setlocale() https://php.net/setlocale. * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat() instead. + * Deprecated since 2.55.0 + * * @param string $format * * @return string diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/DeprecatedProperties.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/DeprecatedProperties.php new file mode 100644 index 00000000..5acc6f5c --- /dev/null +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/DeprecatedProperties.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon\Traits; + +trait DeprecatedProperties +{ + /** + * the day of week in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('MMM') instead. + * Deprecated since 2.55.0 + */ + public $localeDayOfWeek; + + /** + * the abbreviated day of week in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('dddd') instead. + * Deprecated since 2.55.0 + */ + public $shortLocaleDayOfWeek; + + /** + * the month in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('ddd') instead. + * Deprecated since 2.55.0 + */ + public $localeMonth; + + /** + * the abbreviated month in current locale LC_TIME + * + * @var string + * + * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. + * Use ->isoFormat('MMMM') instead. + * Deprecated since 2.55.0 + */ + public $shortLocaleMonth; +} diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php index b1cdd6e3..cce1d2c3 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\Carbon; @@ -111,7 +112,8 @@ trait Difference /** * Get the difference as a DateInterval instance. - * Return relative interval (negative if + * Return relative interval (negative if $absolute flag is not set to true and the given date is before + * current one). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference @@ -123,8 +125,10 @@ trait Difference { $other = $this->resolveCarbon($date); - // Can be removed if https://github.com/derickr/timelib/pull/110 - // is merged + // Work-around for https://bugs.php.net/bug.php?id=81458 + // It was initially introduced for https://bugs.php.net/bug.php?id=80998 + // The very specific case of 80998 was fixed in PHP 8.1beta3, but it introduced 81458 + // So we still need to keep this for now // @codeCoverageIgnoreStart if (version_compare(PHP_VERSION, '8.1.0-dev', '>=') && $other->tz !== $this->tz) { $other = $other->avoidMutation()->tz($this->tz); @@ -136,7 +140,8 @@ trait Difference /** * Get the difference as a CarbonInterval instance. - * Return absolute interval (always positive) unless you pass false to the second argument. + * Return relative interval (negative if $absolute flag is not set to true and the given date is before + * current one). * * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date * @param bool $absolute Get the absolute of the difference @@ -212,7 +217,7 @@ trait Difference */ public function diffInDays($date = null, $absolute = true) { - return (int) $this->diff($this->resolveCarbon($date), $absolute)->format('%r%a'); + return $this->getIntervalDayDiff($this->diff($this->resolveCarbon($date), $absolute)); } /** @@ -513,7 +518,7 @@ trait Difference return $hoursDiff / static::HOURS_PER_DAY; } - $daysDiff = (int) $interval->format('%r%a'); + $daysDiff = $this->getIntervalDayDiff($interval); return $daysDiff + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY; } @@ -781,6 +786,10 @@ trait Difference * - 'short' entry (see below) * - 'parts' entry (see below) * - 'options' entry (see below) + * - 'skip' entry, list of units to skip (array of strings or a single string, + * ` it can be the unit name (singular or plural) or its shortcut + * ` (y, m, w, d, h, min, s, ms, ”s). + * - 'aUnit' entry, prefer "an hour" over "1 hour" if true * - 'join' entry determines how to join multiple parts of the string * ` - if $join is a string, it's used as a joiner glue * ` - if $join is a callable/closure, it get the list of string and should return a string @@ -789,6 +798,8 @@ trait Difference * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) * ` - if $join is missing, a space will be used as glue * - 'other' entry (see above) + * - 'minimumUnit' entry determines the smallest unit of time to display can be long or + * ` short form of the units, e.g. 'hour' or 'h' (default value: s) * if int passed, it add modifiers: * Possible values: * - CarbonInterface::DIFF_ABSOLUTE no modifiers @@ -815,7 +826,7 @@ trait Difference $syntax['syntax'] = $syntax['syntax'] ?? null; $intSyntax = &$syntax['syntax']; } - $intSyntax = (int) ($intSyntax === null ? static::DIFF_RELATIVE_AUTO : $intSyntax); + $intSyntax = (int) ($intSyntax ?? static::DIFF_RELATIVE_AUTO); $intSyntax = $intSyntax === static::DIFF_RELATIVE_AUTO && $other === null ? static::DIFF_RELATIVE_TO_NOW : $intSyntax; $parts = min(7, max(1, (int) $parts)); @@ -1138,4 +1149,21 @@ trait Difference return $this->isoFormat((string) $format); } + + private function getIntervalDayDiff(DateInterval $interval): int + { + $daysDiff = (int) $interval->format('%a'); + $sign = $interval->format('%r') === '-' ? -1 : 1; + + if (\is_int($interval->days) && + $interval->y === 0 && + $interval->m === 0 && + version_compare(PHP_VERSION, '8.1.0-dev', '<') && + abs($interval->d - $daysDiff) === 1 + ) { + $daysDiff = abs($interval->d); + } + + return $daysDiff * $sign; + } } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php index 6f6c9d1d..4cd66b67 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\CarbonInterval; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/IntervalStep.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/IntervalStep.php index 4882eef6..82d7c326 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/IntervalStep.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/IntervalStep.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\Carbon; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php index 9162dc94..ddd2b4e9 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\CarbonInterface; @@ -15,6 +16,7 @@ use Carbon\Exceptions\InvalidTypeException; use Carbon\Exceptions\NotLocaleAwareException; use Carbon\Language; use Carbon\Translator; +use Carbon\TranslatorStrongTypeInterface; use Closure; use Symfony\Component\Translation\TranslatorBagInterface; use Symfony\Component\Translation\TranslatorInterface; @@ -181,7 +183,7 @@ trait Localization $locale = $translator->getLocale(); } - $result = $translator->getCatalogue($locale)->get($key); + $result = self::getFromCatalogue($translator, $translator->getCatalogue($locale), $key); return $result === $key ? $default : $result; } @@ -237,10 +239,11 @@ trait Localization /** * Translate using translation string or callback available. * - * @param string $key - * @param array $parameters - * @param string|int|float|null $number - * @param \Symfony\Component\Translation\TranslatorInterface $translator + * @param string $key + * @param array $parameters + * @param string|int|float|null $number + * @param \Symfony\Component\Translation\TranslatorInterface|null $translator + * @param bool $altNumbers * * @return string */ @@ -582,7 +585,9 @@ trait Localization } foreach (['ago', 'from_now', 'before', 'after'] as $key) { - if ($translator instanceof TranslatorBagInterface && $translator->getCatalogue($newLocale)->get($key) instanceof Closure) { + if ($translator instanceof TranslatorBagInterface && + self::getFromCatalogue($translator, $translator->getCatalogue($newLocale), $key) instanceof Closure + ) { continue; } @@ -735,6 +740,19 @@ trait Localization return $translator; } + /** + * @param mixed $translator + * @param \Symfony\Component\Translation\MessageCatalogueInterface $catalogue + * + * @return mixed + */ + private static function getFromCatalogue($translator, $catalogue, string $id, string $domain = 'messages') + { + return $translator instanceof TranslatorStrongTypeInterface + ? $translator->getFromCatalogue($catalogue, $id, $domain) // @codeCoverageIgnore + : $catalogue->get($id, $domain); + } + /** * Return the word cleaned from its translation codes. * @@ -774,7 +792,7 @@ trait Localization $parts = explode('|', $message); return $key === 'to' - ? static::cleanWordFromTranslationString(end($parts)) + ? self::cleanWordFromTranslationString(end($parts)) : '(?:'.implode('|', array_map([static::class, 'cleanWordFromTranslationString'], $parts)).')'; }, $keys); } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Macro.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Macro.php index d4135264..92b6c9d8 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Macro.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Macro.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; /** diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php index b9c868df..88b251df 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Closure; @@ -65,8 +66,8 @@ trait Mixin public static function mixin($mixin) { \is_string($mixin) && trait_exists($mixin) - ? static::loadMixinTrait($mixin) - : static::loadMixinClass($mixin); + ? self::loadMixinTrait($mixin) + : self::loadMixinClass($mixin); } /** @@ -114,7 +115,7 @@ trait Mixin } // in case of errors not converted into exceptions - $closure = $closure ?? $closureBase; + $closure = $closure ?: $closureBase; return $closure(...\func_get_args()); }); diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php index 2fd64264..164dbbd1 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\CarbonInterface; @@ -429,6 +430,8 @@ trait Modifiers * Calls \DateTime::modify if mutable or \DateTimeImmutable::modify else. * * @see https://php.net/manual/en/datetime.modify.php + * + * @return static|false */ #[ReturnTypeWillChange] public function modify($modify) diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Mutability.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Mutability.php index 66eaa124..561c867d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Mutability.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Mutability.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\Carbon; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/ObjectInitialisation.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/ObjectInitialisation.php index 252df3a5..c77a1024 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/ObjectInitialisation.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/ObjectInitialisation.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; trait ObjectInitialisation diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Options.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Options.php index 0a49372c..0ddee8dd 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Options.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Options.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\CarbonInterface; @@ -385,6 +386,10 @@ trait Options $this->locale(...$locales); } + if (isset($settings['innerTimezone'])) { + return $this->setTimezone($settings['innerTimezone']); + } + if (isset($settings['timezone'])) { return $this->shiftTimezone($settings['timezone']); } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php index 03d3fe69..33062397 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\CarbonInterface; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php index a27e4e35..eebc69bd 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\Exceptions\InvalidFormatException; @@ -135,6 +136,8 @@ trait Serialization /** * Set locale if specified on unserialize() called. + * + * @return void */ #[ReturnTypeWillChange] public function __wakeup() diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Test.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Test.php index d9989749..c86faa74 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Test.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Test.php @@ -8,10 +8,16 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; +use Carbon\CarbonInterface; +use Carbon\CarbonTimeZone; use Closure; use DateTimeImmutable; +use DateTimeInterface; +use InvalidArgumentException; +use Throwable; trait Test { @@ -26,6 +32,13 @@ trait Test */ protected static $testNow; + /** + * The timezone to resto to when clearing the time mock. + * + * @var string|null + */ + protected static $testDefaultTimezone; + /** * Set a Carbon instance (real or mock) to be returned when a "now" * instance is created. The provided instance will be returned @@ -38,6 +51,9 @@ trait Test * Note the timezone parameter was left out of the examples above and * has no affect as the mock value will be returned regardless of its value. * + * Only the moment is mocked with setTestNow(), the timezone will still be the one passed + * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). + * * To clear the test instance call this method using the default * parameter of null. * @@ -54,6 +70,50 @@ trait Test static::$testNow = \is_string($testNow) ? static::parse($testNow) : $testNow; } + /** + * Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() + * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) + * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') + * - When a string containing the desired time is passed to Carbon::parse(). + * + * It will also align default timezone (e.g. call date_default_timezone_set()) with + * the second argument or if null, with the timezone of the given date object. + * + * To clear the test instance call this method using the default + * parameter of null. + * + * /!\ Use this method for unit tests only. + * + * @param Closure|static|string|false|null $testNow real or mock Carbon instance + */ + public static function setTestNowAndTimezone($testNow = null, $tz = null) + { + if ($testNow) { + self::$testDefaultTimezone = self::$testDefaultTimezone ?? date_default_timezone_get(); + } + + $useDateInstanceTimezone = $testNow instanceof DateTimeInterface; + + if ($useDateInstanceTimezone) { + self::setDefaultTimezone($testNow->getTimezone()->getName(), $testNow); + } + + static::setTestNow($testNow); + + if (!$useDateInstanceTimezone) { + $now = static::getMockedTestNow(\func_num_args() === 1 ? null : $tz); + $tzName = $now ? $now->tzName : null; + self::setDefaultTimezone($tzName ?? self::$testDefaultTimezone ?? 'UTC', $now); + } + + if (!$testNow) { + self::$testDefaultTimezone = null; + } + } + /** * Temporarily sets a static date to be used within the callback. * Using setTestNow to set the date, executing the callback, then @@ -61,8 +121,8 @@ trait Test * * /!\ Use this method for unit tests only. * - * @param Closure|static|string|false|null $testNow real or mock Carbon instance - * @param Closure|null $callback + * @param Closure|static|string|false|null $testNow real or mock Carbon instance + * @param Closure|null $callback * * @return mixed */ @@ -97,27 +157,6 @@ trait Test return static::getTestNow() !== null; } - /** - * Return the given timezone and set it to the test instance if not null. - * If null, get the timezone from the test instance and return it. - * - * @param string|\DateTimeZone $tz - * @param \Carbon\CarbonInterface $testInstance - * - * @return string|\DateTimeZone - */ - protected static function handleMockTimezone($tz, &$testInstance) - { - //shift the time according to the given time zone - if ($tz !== null && $tz !== static::getMockedTestNow($tz)->getTimezone()) { - $testInstance = $testInstance->setTimezone($tz); - - return $tz; - } - - return $testInstance->getTimezone(); - } - /** * Get the mocked date passed in setTestNow() and if it's a Closure, execute it. * @@ -138,20 +177,48 @@ trait Test } /* @var \Carbon\CarbonImmutable|\Carbon\Carbon|null $testNow */ - return $testNow; + return $testNow instanceof CarbonInterface + ? $testNow->avoidMutation()->tz($tz) + : $testNow; } - protected static function mockConstructorParameters(&$time, &$tz) + protected static function mockConstructorParameters(&$time, $tz) { /** @var \Carbon\CarbonImmutable|\Carbon\Carbon $testInstance */ $testInstance = clone static::getMockedTestNow($tz); - $tz = static::handleMockTimezone($tz, $testInstance); - if (static::hasRelativeKeywords($time)) { $testInstance = $testInstance->modify($time); } - $time = $testInstance instanceof self ? $testInstance->rawFormat(static::MOCK_DATETIME_FORMAT) : $testInstance->format(static::MOCK_DATETIME_FORMAT); + $time = $testInstance instanceof self + ? $testInstance->rawFormat(static::MOCK_DATETIME_FORMAT) + : $testInstance->format(static::MOCK_DATETIME_FORMAT); + } + + private static function setDefaultTimezone($timezone, DateTimeInterface $date = null) + { + $previous = null; + $success = false; + + try { + $success = date_default_timezone_set($timezone); + } catch (Throwable $exception) { + $previous = $exception; + } + + if (!$success) { + $suggestion = @CarbonTimeZone::create($timezone)->toRegionName($date); + + throw new InvalidArgumentException( + "Timezone ID '$timezone' is invalid". + ($suggestion && $suggestion !== $timezone ? ", did you mean '$suggestion'?" : '.')."\n". + "It must be one of the IDs from DateTimeZone::listIdentifiers(),\n". + 'For the record, hours/minutes offset are relevant only for a particular moment, '. + 'but not as a default timezone.', + 0, + $previous + ); + } } } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php index 35d45aa5..2cb5c48d 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; /** diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Units.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Units.php index aec85ab2..2902a8b1 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Units.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Units.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; use Carbon\CarbonConverterInterface; @@ -201,21 +202,6 @@ trait Units $unit = CarbonInterval::make($unit); } - // Can be removed if https://bugs.php.net/bug.php?id=81106 - // is fixed - // @codeCoverageIgnoreStart - if ( - $unit instanceof DateInterval && - version_compare(PHP_VERSION, '8.1.0-dev', '>=') && - ($unit->f < 0 || $unit->f >= 1) - ) { - $unit = clone $unit; - $seconds = floor($unit->f); - $unit->f -= $seconds; - $unit->s += (int) $seconds; - } - // @codeCoverageIgnoreEnd - if ($unit instanceof CarbonConverterInterface) { return $this->resolveCarbon($unit->convertDate($this, false)); } @@ -252,6 +238,7 @@ trait Units return $date->isMutable() ? $date : $date->avoidMutation(); } + $unit = self::singularUnit($unit); $metaUnits = [ 'millennium' => [static::YEARS_PER_MILLENNIUM, 'year'], 'century' => [static::YEARS_PER_CENTURY, 'year'], @@ -320,11 +307,13 @@ trait Units $date = $date->modify("$value $unit"); if (isset($timeString)) { - return $date->setTimeFromTimeString($timeString); + $date = $date->setTimeFromTimeString($timeString); + } elseif (isset($canOverflow, $day) && $canOverflow && $day !== $date->day) { + $date = $date->modify('last day of previous month'); } - if (isset($canOverflow, $day) && $canOverflow && $day !== $date->day) { - $date = $date->modify('last day of previous month'); + if (!$date) { + throw new UnitException('Unable to add unit '.var_export(\func_get_args(), true)); } return $date; diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Week.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Week.php index 64cece7a..6f148145 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Week.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Traits/Week.php @@ -8,6 +8,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon\Traits; /** diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Translator.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Translator.php index 9af48ebe..491c9e72 100644 --- a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Translator.php +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/Translator.php @@ -8,396 +8,25 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + namespace Carbon; -use Closure; -use ReflectionException; -use ReflectionFunction; +use ReflectionMethod; use Symfony\Component\Translation; +use Symfony\Contracts\Translation\TranslatorInterface; -class Translator extends Translation\Translator +$transMethod = new ReflectionMethod( + class_exists(TranslatorInterface::class) + ? TranslatorInterface::class + : Translation\Translator::class, + 'trans' +); + +require $transMethod->hasReturnType() + ? __DIR__.'/../../lazy/Carbon/TranslatorStrongType.php' + : __DIR__.'/../../lazy/Carbon/TranslatorWeakType.php'; + +class Translator extends LazyTranslator { - /** - * Translator singletons for each language. - * - * @var array - */ - protected static $singletons = []; - - /** - * List of custom localized messages. - * - * @var array - */ - protected $messages = []; - - /** - * List of custom directories that contain translation files. - * - * @var string[] - */ - protected $directories = []; - - /** - * Set to true while constructing. - * - * @var bool - */ - protected $initializing = false; - - /** - * List of locales aliases. - * - * @var string[] - */ - protected $aliases = [ - 'me' => 'sr_Latn_ME', - 'scr' => 'sh', - ]; - - /** - * Return a singleton instance of Translator. - * - * @param string|null $locale optional initial locale ("en" - english by default) - * - * @return static - */ - public static function get($locale = null) - { - $locale = $locale ?: 'en'; - - if (!isset(static::$singletons[$locale])) { - static::$singletons[$locale] = new static($locale ?: 'en'); - } - - return static::$singletons[$locale]; - } - - public function __construct($locale, Translation\Formatter\MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) - { - $this->initializing = true; - $this->directories = [__DIR__.'/Lang']; - $this->addLoader('array', new Translation\Loader\ArrayLoader()); - parent::__construct($locale, $formatter, $cacheDir, $debug); - $this->initializing = false; - } - - /** - * Returns the list of directories translation files are searched in. - * - * @return array - */ - public function getDirectories(): array - { - return $this->directories; - } - - /** - * Set list of directories translation files are searched in. - * - * @param array $directories new directories list - * - * @return $this - */ - public function setDirectories(array $directories) - { - $this->directories = $directories; - - return $this; - } - - /** - * Add a directory to the list translation files are searched in. - * - * @param string $directory new directory - * - * @return $this - */ - public function addDirectory(string $directory) - { - $this->directories[] = $directory; - - return $this; - } - - /** - * Remove a directory from the list translation files are searched in. - * - * @param string $directory directory path - * - * @return $this - */ - public function removeDirectory(string $directory) - { - $search = rtrim(strtr($directory, '\\', '/'), '/'); - - return $this->setDirectories(array_filter($this->getDirectories(), function ($item) use ($search) { - return rtrim(strtr($item, '\\', '/'), '/') !== $search; - })); - } - - /** - * Returns the translation. - * - * @param string $id - * @param array $parameters - * @param string $domain - * @param string $locale - * - * @return string - */ - public function trans($id, array $parameters = [], $domain = null, $locale = null) - { - if ($domain === null) { - $domain = 'messages'; - } - - $format = $this->getCatalogue($locale)->get((string) $id, $domain); - - if ($format instanceof Closure) { - // @codeCoverageIgnoreStart - try { - $count = (new ReflectionFunction($format))->getNumberOfRequiredParameters(); - } catch (ReflectionException $exception) { - $count = 0; - } - // @codeCoverageIgnoreEnd - - return $format( - ...array_values($parameters), - ...array_fill(0, max(0, $count - \count($parameters)), null) - ); - } - - return parent::trans($id, $parameters, $domain, $locale); - } - - /** - * Reset messages of a locale (all locale if no locale passed). - * Remove custom messages and reload initial messages from matching - * file in Lang directory. - * - * @param string|null $locale - * - * @return bool - */ - public function resetMessages($locale = null) - { - if ($locale === null) { - $this->messages = []; - - return true; - } - - foreach ($this->getDirectories() as $directory) { - $data = @include sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale); - - if ($data !== false) { - $this->messages[$locale] = $data; - $this->addResource('array', $this->messages[$locale], $locale); - - return true; - } - } - - return false; - } - - /** - * Returns the list of files matching a given locale prefix (or all if empty). - * - * @param string $prefix prefix required to filter result - * - * @return array - */ - public function getLocalesFiles($prefix = '') - { - $files = []; - - foreach ($this->getDirectories() as $directory) { - $directory = rtrim($directory, '\\/'); - - foreach (glob("$directory/$prefix*.php") as $file) { - $files[] = $file; - } - } - - return array_unique($files); - } - - /** - * Returns the list of internally available locales and already loaded custom locales. - * (It will ignore custom translator dynamic loading.) - * - * @param string $prefix prefix required to filter result - * - * @return array - */ - public function getAvailableLocales($prefix = '') - { - $locales = []; - foreach ($this->getLocalesFiles($prefix) as $file) { - $locales[] = substr($file, strrpos($file, '/') + 1, -4); - } - - return array_unique(array_merge($locales, array_keys($this->messages))); - } - - /** - * Init messages language from matching file in Lang directory. - * - * @param string $locale - * - * @return bool - */ - protected function loadMessagesFromFile($locale) - { - if (isset($this->messages[$locale])) { - return true; - } - - return $this->resetMessages($locale); - } - - /** - * Set messages of a locale and take file first if present. - * - * @param string $locale - * @param array $messages - * - * @return $this - */ - public function setMessages($locale, $messages) - { - $this->loadMessagesFromFile($locale); - $this->addResource('array', $messages, $locale); - $this->messages[$locale] = array_merge( - isset($this->messages[$locale]) ? $this->messages[$locale] : [], - $messages - ); - - return $this; - } - - /** - * Set messages of the current locale and take file first if present. - * - * @param array $messages - * - * @return $this - */ - public function setTranslations($messages) - { - return $this->setMessages($this->getLocale(), $messages); - } - - /** - * Get messages of a locale, if none given, return all the - * languages. - * - * @param string|null $locale - * - * @return array - */ - public function getMessages($locale = null) - { - return $locale === null ? $this->messages : $this->messages[$locale]; - } - - /** - * Set the current translator locale and indicate if the source locale file exists - * - * @param string $locale locale ex. en - * - * @return bool - */ - public function setLocale($locale) - { - $locale = preg_replace_callback('/[-_]([a-z]{2,}|[0-9]{2,})/', function ($matches) { - // _2-letters or YUE is a region, _3+-letters is a variant - $upper = strtoupper($matches[1]); - - if ($upper === 'YUE' || $upper === 'ISO' || \strlen($upper) < 3) { - return "_$upper"; - } - - return '_'.ucfirst($matches[1]); - }, strtolower($locale)); - - $previousLocale = $this->getLocale(); - - if ($previousLocale === $locale && isset($this->messages[$locale])) { - return true; - } - - unset(static::$singletons[$previousLocale]); - - if ($locale === 'auto') { - $completeLocale = setlocale(LC_TIME, '0'); - $locale = preg_replace('/^([^_.-]+).*$/', '$1', $completeLocale); - $locales = $this->getAvailableLocales($locale); - - $completeLocaleChunks = preg_split('/[_.-]+/', $completeLocale); - - $getScore = function ($language) use ($completeLocaleChunks) { - return static::compareChunkLists($completeLocaleChunks, preg_split('/[_.-]+/', $language)); - }; - - usort($locales, function ($first, $second) use ($getScore) { - return $getScore($second) <=> $getScore($first); - }); - - $locale = $locales[0]; - } - - if (isset($this->aliases[$locale])) { - $locale = $this->aliases[$locale]; - } - - // If subtag (ex: en_CA) first load the macro (ex: en) to have a fallback - if (str_contains($locale, '_') && - $this->loadMessagesFromFile($macroLocale = preg_replace('/^([^_]+).*$/', '$1', $locale)) - ) { - parent::setLocale($macroLocale); - } - - if ($this->loadMessagesFromFile($locale) || $this->initializing) { - parent::setLocale($locale); - - return true; - } - - return false; - } - - /** - * Show locale on var_dump(). - * - * @return array - */ - public function __debugInfo() - { - return [ - 'locale' => $this->getLocale(), - ]; - } - - private static function compareChunkLists($referenceChunks, $chunks) - { - $score = 0; - - foreach ($referenceChunks as $index => $chunk) { - if (!isset($chunks[$index])) { - $score++; - - continue; - } - - if (strtolower($chunks[$index]) === strtolower($chunk)) { - $score += 10; - } - } - - return $score; - } + // Proxy dynamically loaded LazyTranslator in a static way } diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php new file mode 100644 index 00000000..ad36c670 --- /dev/null +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php @@ -0,0 +1,99 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Carbon\Exceptions\ImmutableException; +use Symfony\Component\Config\ConfigCacheFactoryInterface; +use Symfony\Component\Translation\Formatter\MessageFormatterInterface; + +class TranslatorImmutable extends Translator +{ + /** @var bool */ + private $constructed = false; + + public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) + { + parent::__construct($locale, $formatter, $cacheDir, $debug); + $this->constructed = true; + } + + /** + * @codeCoverageIgnore + */ + public function setDirectories(array $directories) + { + $this->disallowMutation(__METHOD__); + + return parent::setDirectories($directories); + } + + public function setLocale($locale) + { + $this->disallowMutation(__METHOD__); + + return parent::setLocale($locale); + } + + /** + * @codeCoverageIgnore + */ + public function setMessages($locale, $messages) + { + $this->disallowMutation(__METHOD__); + + return parent::setMessages($locale, $messages); + } + + /** + * @codeCoverageIgnore + */ + public function setTranslations($messages) + { + $this->disallowMutation(__METHOD__); + + return parent::setTranslations($messages); + } + + /** + * @codeCoverageIgnore + */ + public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) + { + $this->disallowMutation(__METHOD__); + + parent::setConfigCacheFactory($configCacheFactory); + } + + public function resetMessages($locale = null) + { + $this->disallowMutation(__METHOD__); + + return parent::resetMessages($locale); + } + + /** + * @codeCoverageIgnore + */ + public function setFallbackLocales(array $locales) + { + $this->disallowMutation(__METHOD__); + + parent::setFallbackLocales($locales); + } + + private function disallowMutation($method) + { + if ($this->constructed) { + throw new ImmutableException($method.' not allowed on '.static::class); + } + } +} diff --git a/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php new file mode 100644 index 00000000..ef4dee8e --- /dev/null +++ b/data/web/inc/lib/vendor/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Carbon; + +use Symfony\Component\Translation\MessageCatalogueInterface; + +/** + * Mark translator using strong type from symfony/translation >= 6. + */ +interface TranslatorStrongTypeInterface +{ + public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages'); +} diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/README.md b/data/web/inc/lib/vendor/phpmailer/phpmailer/README.md index fa27d2f6..81b08976 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/README.md +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/README.md @@ -2,7 +2,12 @@ # PHPMailer – A full-featured email creation and transfer class for PHP -[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions) [![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) [![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![API Docs](https://github.com/phpmailer/phpmailer/workflows/Docs/badge.svg)](https://phpmailer.github.io/PHPMailer/) +[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions) +[![codecov.io](https://codecov.io/gh/PHPMailer/PHPMailer/branch/master/graph/badge.svg?token=iORZpwmYmM)](https://codecov.io/gh/PHPMailer/PHPMailer) +[![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) +[![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) +[![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) +[![API Docs](https://github.com/phpmailer/phpmailer/workflows/Docs/badge.svg)](https://phpmailer.github.io/PHPMailer/) ## Features - Probably the world's most popular code for sending email from PHP! @@ -17,7 +22,7 @@ - Protects against header injection attacks - Error messages in over 50 languages! - DKIM and S/MIME signing support -- Compatible with PHP 5.5 and later, including PHP 8.0 +- Compatible with PHP 5.5 and later, including PHP 8.1 - Namespaced to prevent name clashes - Much more! @@ -39,7 +44,7 @@ This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lg PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file: ```json -"phpmailer/phpmailer": "^6.2" +"phpmailer/phpmailer": "^6.5" ``` or run @@ -89,7 +94,7 @@ use PHPMailer\PHPMailer\Exception; //Load Composer's autoloader require 'vendor/autoload.php'; -//Instantiation and passing `true` enables exceptions +//Create an instance; passing `true` enables exceptions $mail = new PHPMailer(true); try { @@ -100,8 +105,8 @@ try { $mail->SMTPAuth = true; //Enable SMTP authentication $mail->Username = 'user@example.com'; //SMTP username $mail->Password = 'secret'; //SMTP password - $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged - $mail->Port = 587; //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above + $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption + $mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS` //Recipients $mail->setFrom('from@example.com', 'Mailer'); diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/VERSION b/data/web/inc/lib/vendor/phpmailer/phpmailer/VERSION index 4be2c727..cd802a1e 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/VERSION +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.6.0 \ No newline at end of file diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/composer.json b/data/web/inc/lib/vendor/phpmailer/phpmailer/composer.json index 58393b2c..b13732be 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/composer.json +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/composer.json @@ -25,6 +25,11 @@ "type": "github" } ], + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } + }, "require": { "php": ">=5.5.0", "ext-ctype": "*", @@ -34,10 +39,12 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", + "php-parallel-lint/php-console-highlighter": "^0.5.0", + "php-parallel-lint/php-parallel-lint": "^1.3.1", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.5.6", - "yoast/phpunit-polyfills": "^0.2.0" + "squizlabs/php_codesniffer": "^3.6.2", + "yoast/phpunit-polyfills": "^1.0.0" }, "suggest": { "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", @@ -60,6 +67,10 @@ "license": "LGPL-2.1-only", "scripts": { "check": "./vendor/bin/phpcs", - "test": "./vendor/bin/phpunit" + "test": "./vendor/bin/phpunit --no-coverage", + "coverage": "./vendor/bin/phpunit", + "lint": [ + "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php,phps --exclude vendor --exclude .git --exclude build" + ] } } diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php index b57f0ec6..38a7a8e7 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php @@ -9,24 +9,30 @@ * @see http://unicode.org/udhr/n/notes_fra.html */ -$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : Ă©chec de l\'authentification.'; +$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : Ă©chec de l’authentification.'; +$PHPMAILER_LANG['buggy_php'] = 'Votre version de PHP est affectĂ©e par un bug qui peut entraĂźner des messages corrompus. Pour rĂ©soudre ce problĂšme, passez Ă  l’envoi par SMTP, dĂ©sactivez l’option mail.add_x_header dans le fichier php.ini, passez Ă  MacOS ou Linux, ou passez PHP Ă  la version 7.0.17+ ou 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'Erreur SMTP : impossible de se connecter au serveur SMTP.'; $PHPMAILER_LANG['data_not_accepted'] = 'Erreur SMTP : donnĂ©es incorrectes.'; $PHPMAILER_LANG['empty_message'] = 'Corps du message vide.'; $PHPMAILER_LANG['encoding'] = 'Encodage inconnu : '; -$PHPMAILER_LANG['execute'] = 'Impossible de lancer l\'exĂ©cution : '; -$PHPMAILER_LANG['file_access'] = 'Impossible d\'accĂ©der au fichier : '; +$PHPMAILER_LANG['execute'] = 'Impossible de lancer l’exĂ©cution : '; +$PHPMAILER_LANG['extension_missing'] = 'Extension manquante : '; +$PHPMAILER_LANG['file_access'] = 'Impossible d’accĂ©der au fichier : '; $PHPMAILER_LANG['file_open'] = 'Ouverture du fichier impossible : '; -$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expĂ©diteur suivante a Ă©choué : '; -$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.'; -$PHPMAILER_LANG['invalid_address'] = 'L\'adresse courriel n\'est pas valide : '; -$PHPMAILER_LANG['invalid_hostentry'] = 'L\'entrĂ©e hĂŽte n\'est pas valide : '; -$PHPMAILER_LANG['invalid_host'] = 'L\'hĂŽte n\'est pas valide : '; +$PHPMAILER_LANG['from_failed'] = 'L’adresse d’expĂ©diteur suivante a Ă©choué : '; +$PHPMAILER_LANG['instantiate'] = 'Impossible d’instancier la fonction mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Adresse courriel non valide : '; +$PHPMAILER_LANG['invalid_header'] = 'Nom ou valeur de l’en-tĂȘte non valide'; +$PHPMAILER_LANG['invalid_hostentry'] = 'EntrĂ©e d’hĂŽte non valide : '; +$PHPMAILER_LANG['invalid_host'] = 'HĂŽte non valide : '; $PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supportĂ©.'; $PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.'; -$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : les destinataires suivants sont en erreur : '; +$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : les destinataires suivants ont Ă©choué : '; $PHPMAILER_LANG['signing'] = 'Erreur de signature : '; -$PHPMAILER_LANG['smtp_connect_failed'] = 'Échec de la connexion SMTP.'; +$PHPMAILER_LANG['smtp_code'] = 'Code SMTP : '; +$PHPMAILER_LANG['smtp_code_ex'] = 'Informations supplĂ©mentaires SMTP : '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a Ă©chouĂ©e.'; +$PHPMAILER_LANG['smtp_detail'] = 'DĂ©tails : '; $PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP : '; -$PHPMAILER_LANG['variable_set'] = 'Impossible d\'initialiser ou de rĂ©initialiser une variable : '; +$PHPMAILER_LANG['variable_set'] = 'Impossible d’initialiser ou de rĂ©initialiser une variable : '; $PHPMAILER_LANG['extension_missing'] = 'Extension manquante : '; diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php index eee79898..c76f5264 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php @@ -5,24 +5,25 @@ * @package PHPMailer * @author Mitsuhiro Yoshida * @author Yoshi Sakai + * @author Arisophy */ $PHPMAILER_LANG['authenticate'] = 'SMTPă‚šăƒ©ăƒŒ: èȘèšŒă§ăăŸă›ă‚“ă§ă—ăŸă€‚'; $PHPMAILER_LANG['connect_host'] = 'SMTPă‚šăƒ©ăƒŒ: SMTPホă‚čăƒˆă«æŽ„ç¶šă§ăăŸă›ă‚“ă§ă—ăŸă€‚'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTPă‚šăƒ©ăƒŒ: ăƒ‡ăƒŒă‚żăŒć—ă‘ä»˜ă‘ă‚‰ă‚ŒăŸă›ă‚“ă§ă—ăŸă€‚'; -//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['empty_message'] = 'ăƒĄăƒŒăƒ«æœŹæ–‡ăŒç©șです。'; $PHPMAILER_LANG['encoding'] = '䞍明ăȘă‚šăƒłă‚łăƒŒăƒ‡ă‚Łăƒłă‚°: '; $PHPMAILER_LANG['execute'] = 'ćźŸèĄŒă§ăăŸă›ă‚“ă§ă—ăŸ: '; $PHPMAILER_LANG['file_access'] = 'ăƒ•ă‚Ąă‚€ăƒ«ă«ă‚ąă‚Żă‚»ă‚čă§ăăŸă›ă‚“: '; $PHPMAILER_LANG['file_open'] = 'ăƒ•ă‚Ąă‚€ăƒ«ă‚šăƒ©ăƒŒ: ăƒ•ă‚Ąă‚€ăƒ«ă‚’é–‹ă‘ăŸă›ă‚“: '; $PHPMAILER_LANG['from_failed'] = 'Fromケドレă‚čă‚’ç™»éŒČă™ă‚‹éš›ă«ă‚šăƒ©ăƒŒăŒç™șç”Ÿă—ăŸă—ăŸ: '; $PHPMAILER_LANG['instantiate'] = 'ăƒĄăƒŒăƒ«é–ąæ•°ăŒæ­Łćžžă«ć‹•äœœă—ăŸă›ă‚“ă§ă—ăŸă€‚'; -//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['invalid_address'] = 'äžæ­ŁăȘăƒĄăƒŒăƒ«ă‚ąăƒ‰ăƒŹă‚č: '; $PHPMAILER_LANG['provide_address'] = '民ăȘくべも1ă€ăƒĄăƒŒăƒ«ă‚ąăƒ‰ăƒŹă‚čを æŒ‡ćźšă™ă‚‹ćż…èŠăŒă‚ă‚ŠăŸă™ă€‚'; $PHPMAILER_LANG['mailer_not_supported'] = ' ăƒĄăƒŒăƒ©ăƒŒăŒă‚”ăƒăƒŒăƒˆă•ă‚ŒăŠă„ăŸă›ă‚“ă€‚'; $PHPMAILER_LANG['recipients_failed'] = 'SMTPă‚šăƒ©ăƒŒ: æŹĄăźć—äżĄè€…ă‚ąăƒ‰ăƒŹă‚čに é–“é•ă„ăŒă‚ă‚ŠăŸă™: '; -//$PHPMAILER_LANG['signing'] = 'Signing Error: '; -//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; -//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; -//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; +$PHPMAILER_LANG['signing'] = 'çœČćă‚šăƒ©ăƒŒ: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTPæŽ„ç¶šă«ć€±æ•—ă—ăŸă—ăŸă€‚'; +$PHPMAILER_LANG['smtp_error'] = 'SMTPă‚”ăƒŒăƒăƒŒă‚šăƒ©ăƒŒ: '; +$PHPMAILER_LANG['variable_set'] = 'ć€‰æ•°ăŒć­˜ćœšă—ăŸă›ă‚“: '; +$PHPMAILER_LANG['extension_missing'] = 'æ‹ĄćŒ”æ©ŸèƒœăŒèŠ‹ă€ă‹ă‚ŠăŸă›ă‚“: '; diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php index bf41ade8..8229d5e2 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php @@ -7,23 +7,28 @@ */ $PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.'; +$PHPMAILER_LANG['buggy_php'] = 'PHP versie gededecteerd die onderhavig is aan een bug die kan resulteren in gecorrumpeerde berichten. Om dit te voorkomen, gebruik SMTP voor het verzenden van berichten, zet de mail.add_x_header optie in uw php.ini file uit, gebruik MacOS of Linux, of pas de gebruikte PHP versie aan naar versie 7.0.17+ or 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.'; $PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg'; $PHPMAILER_LANG['encoding'] = 'Onbekende codering: '; $PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: '; $PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: '; $PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: '; $PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: '; $PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.'; $PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: '; +$PHPMAILER_LANG['invalid_header'] = 'Ongeldige header naam of waarde'; $PHPMAILER_LANG['invalid_hostentry'] = 'Ongeldige hostentry: '; $PHPMAILER_LANG['invalid_host'] = 'Ongeldige host: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.'; $PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: '; $PHPMAILER_LANG['signing'] = 'Signeerfout: '; +$PHPMAILER_LANG['smtp_code'] = 'SMTP code: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'Aanvullende SMTP informatie: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.'; +$PHPMAILER_LANG['smtp_detail'] = 'Detail: '; $PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: '; $PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: '; -$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: '; diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php index d8638098..5239865a 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php @@ -7,24 +7,32 @@ * @author Lucas GuimarĂŁes * @author Phelipe Alves * @author Fabio Beneditto + * @author Geidson BenĂ­cio Coelho */ $PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: NĂŁo foi possĂ­vel autenticar.'; +$PHPMAILER_LANG['buggy_php'] = 'Sua versĂŁo do PHP Ă© afetada por um bug que por resultar em messagens corrompidas. Para corrigir, mude para enviar usando SMTP, desative a opção mail.add_x_header em seu php.ini, mude para MacOS ou Linux, ou atualize seu PHP para versĂŁo 7.0.17+ ou 7.1.3+ '; $PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: NĂŁo foi possĂ­vel conectar ao servidor SMTP.'; $PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.'; $PHPMAILER_LANG['empty_message'] = 'Mensagem vazia'; $PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; $PHPMAILER_LANG['execute'] = 'NĂŁo foi possĂ­vel executar: '; +$PHPMAILER_LANG['extension_missing'] = 'ExtensĂŁo nĂŁo existe: '; $PHPMAILER_LANG['file_access'] = 'NĂŁo foi possĂ­vel acessar o arquivo: '; $PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: NĂŁo foi possĂ­vel abrir o arquivo: '; $PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: '; $PHPMAILER_LANG['instantiate'] = 'NĂŁo foi possĂ­vel instanciar a função mail.'; $PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail invĂĄlido: '; +$PHPMAILER_LANG['invalid_header'] = 'Nome ou valor de cabeçalho invĂĄlido'; +$PHPMAILER_LANG['invalid_hostentry'] = 'hostentry invĂĄlido: '; +$PHPMAILER_LANG['invalid_host'] = 'host invĂĄlido: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer nĂŁo Ă© suportado.'; $PHPMAILER_LANG['provide_address'] = 'VocĂȘ deve informar pelo menos um destinatĂĄrio.'; $PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatĂĄrios falharam: '; $PHPMAILER_LANG['signing'] = 'Erro de Assinatura: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_code'] = 'CĂłdigo do servidor SMTP: '; $PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'InformaçÔes adicionais do servidor SMTP: '; +$PHPMAILER_LANG['smtp_detail'] = 'Detalhes do servidor SMTP: '; $PHPMAILER_LANG['variable_set'] = 'NĂŁo foi possĂ­vel definir ou redefinir a variĂĄvel: '; -$PHPMAILER_LANG['extension_missing'] = 'ExtensĂŁo nĂŁo existe: '; diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php index 292ec1e4..45bef915 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php @@ -3,25 +3,31 @@ /** * Romanian PHPMailer language file: refer to English translation for definitive list * @package PHPMailer - * @author Alex Florea */ $PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.'; +$PHPMAILER_LANG['buggy_php'] = 'Versiunea instalată de PHP este afectată de o problemă care poate duce la coruperea mesajelor Pentru a preveni această problemă, folosiți SMTP, dezactivați opțiunea mail.add_x_header din php.ini, folosiți MacOS/Linux sau actualizați versiunea de PHP la 7.0.17+ sau 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.'; $PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.'; $PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.'; $PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: '; $PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: '; +$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: '; $PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: '; $PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: '; $PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: '; $PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.'; $PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: '; +$PHPMAILER_LANG['invalid_header'] = 'Numele sau valoarea header-ului nu este validă: '; +$PHPMAILER_LANG['invalid_hostentry'] = 'Hostentry invalid: '; +$PHPMAILER_LANG['invalid_host'] = 'Host invalid: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.'; $PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.'; $PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: '; $PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. '; +$PHPMAILER_LANG['smtp_code'] = 'Cod SMTP: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'Informații SMTP adiționale: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.'; +$PHPMAILER_LANG['smtp_detail'] = 'Detalii SMTP: '; $PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: '; $PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. '; -$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: '; diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php index c437a886..3e00c259 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php @@ -9,23 +9,28 @@ */ $PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.'; +$PHPMAILER_LANG['buggy_php'] = 'Na vaĆĄo PHP različico vpliva napaka, ki lahko povzroči poĆĄkodovana sporočila. Če ĆŸelite teĆŸavo odpraviti, preklopite na poĆĄiljanje prek SMTP, onemogočite moĆŸnost mail.add_x_header v vaĆĄi php.ini datoteki, preklopite na MacOS ali Linux, ali nadgradite vaĆĄo PHP zaličico na 7.0.17+ ali 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Vzpostavljanje povezave s SMTP gostiteljem ni uspelo.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: StreĆŸnik zavrača podatke.'; $PHPMAILER_LANG['empty_message'] = 'E-poĆĄtno sporočilo nima vsebine.'; $PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: '; $PHPMAILER_LANG['execute'] = 'Operacija ni uspela: '; +$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razĆĄiritev: '; $PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: '; $PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: '; $PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov poĆĄiljatelja: '; $PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.'; $PHPMAILER_LANG['invalid_address'] = 'E-poĆĄtno sporočilo ni bilo poslano. E-naslov je neveljaven: '; +$PHPMAILER_LANG['invalid_header'] = 'Neveljavno ime ali vrednost glave'; $PHPMAILER_LANG['invalid_hostentry'] = 'Neveljaven vnos gostitelja: '; $PHPMAILER_LANG['invalid_host'] = 'Neveljaven gostitelj: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.'; $PHPMAILER_LANG['provide_address'] = 'Prosimo, vnesite vsaj enega naslovnika.'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: '; $PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: '; +$PHPMAILER_LANG['smtp_code'] = 'SMTP koda: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'Dodatne informacije o SMTP: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP streĆŸnikom.'; +$PHPMAILER_LANG['smtp_detail'] = 'Podrobnosti: '; $PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP streĆŸnika: '; $PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: '; -$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razĆĄiritev: '; diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/phpunit.xml.dist b/data/web/inc/lib/vendor/phpmailer/phpmailer/phpunit.xml.dist deleted file mode 100644 index c68df965..00000000 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/phpunit.xml.dist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - ./test/ - - - - - - - - languages - pop3 - - - - - ./src - - - - - - - - diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/Exception.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/Exception.php index a50a8991..52eaf951 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/Exception.php +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/Exception.php @@ -35,6 +35,6 @@ class Exception extends \Exception */ public function errorMessage() { - return '' . htmlspecialchars($this->getMessage()) . "
\n"; + return '' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "
\n"; } } diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/OAuth.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/OAuth.php index c93d0be1..c1d5b776 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/OAuth.php +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/OAuth.php @@ -33,7 +33,7 @@ use League\OAuth2\Client\Token\AccessToken; * * @author Marcus Bointon (Synchro/coolbru) */ -class OAuth +class OAuth implements OAuthTokenProvider { /** * An instance of the League OAuth Client Provider. diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php new file mode 100644 index 00000000..11555074 --- /dev/null +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php @@ -0,0 +1,44 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2020 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * OAuthTokenProvider - OAuth2 token provider interface. + * Provides base64 encoded OAuth2 auth strings for SMTP authentication. + * + * @see OAuth + * @see SMTP::authenticate() + * + * @author Peter Scopes (pdscopes) + * @author Marcus Bointon (Synchro/coolbru) + */ +interface OAuthTokenProvider +{ + /** + * Generate a base64-encoded OAuth token ensuring that the access token has not expired. + * The string to be base 64 encoded should be in the form: + * "user=\001auth=Bearer \001\001" + * + * @return string + */ + public function getOauth64(); +} diff --git a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php index eb4b742b..718216b5 100644 --- a/data/web/inc/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php +++ b/data/web/inc/lib/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -103,14 +103,14 @@ class PHPMailer * * @var string */ - public $From = 'root@localhost'; + public $From = ''; /** * The From name of the message. * * @var string */ - public $FromName = 'Root User'; + public $FromName = ''; /** * The envelope sender of the message. @@ -358,9 +358,9 @@ class PHPMailer public $AuthType = ''; /** - * An instance of the PHPMailer OAuth class. + * An implementation of the PHPMailer OAuthTokenProvider interface. * - * @var OAuth + * @var OAuthTokenProvider */ protected $oauth; @@ -689,7 +689,7 @@ class PHPMailer protected $boundary = []; /** - * The array of available languages. + * The array of available text strings for the current language. * * @var array */ @@ -750,7 +750,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.5.0'; + const VERSION = '6.6.0'; /** * Error severity: message only, continue processing. @@ -1185,28 +1185,37 @@ class PHPMailer * * @param string $addrstr The address list string * @param bool $useimap Whether to use the IMAP extension to parse the list + * @param string $charset The charset to use when decoding the address list string. * * @return array */ - public static function parseAddresses($addrstr, $useimap = true) + public static function parseAddresses($addrstr, $useimap = true, $charset = self::CHARSET_ISO88591) { $addresses = []; if ($useimap && function_exists('imap_rfc822_parse_adrlist')) { //Use this built-in parser if it's available $list = imap_rfc822_parse_adrlist($addrstr, ''); + // Clear any potential IMAP errors to get rid of notices being thrown at end of script. + imap_errors(); foreach ($list as $address) { if ( - ('.SYNTAX-ERROR.' !== $address->host) && static::validateAddress( - $address->mailbox . '@' . $address->host - ) + '.SYNTAX-ERROR.' !== $address->host && + static::validateAddress($address->mailbox . '@' . $address->host) ) { //Decode the name part if it's present and encoded if ( property_exists($address, 'personal') && - extension_loaded('mbstring') && - preg_match('/^=\?.*\?=$/', $address->personal) + //Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled + defined('MB_CASE_UPPER') && + preg_match('/^=\?.*\?=$/s', $address->personal) ) { + $origCharset = mb_internal_encoding(); + mb_internal_encoding($charset); + //Undo any RFC2047-encoded spaces-as-underscores + $address->personal = str_replace('_', '=20', $address->personal); + //Decode the name $address->personal = mb_decode_mimeheader($address->personal); + mb_internal_encoding($origCharset); } $addresses[] = [ @@ -1234,9 +1243,16 @@ class PHPMailer $email = trim(str_replace('>', '', $email)); $name = trim($name); if (static::validateAddress($email)) { + //Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled //If this name is encoded, decode it - if (preg_match('/^=\?.*\?=$/', $name)) { + if (defined('MB_CASE_UPPER') && preg_match('/^=\?.*\?=$/s', $name)) { + $origCharset = mb_internal_encoding(); + mb_internal_encoding($charset); + //Undo any RFC2047-encoded spaces-as-underscores + $name = str_replace('_', '=20', $name); + //Decode the name $name = mb_decode_mimeheader($name); + mb_internal_encoding($origCharset); } $addresses[] = [ //Remove any surrounding quotes and spaces from the name @@ -1436,7 +1452,12 @@ class PHPMailer $errorcode = 0; if (defined('INTL_IDNA_VARIANT_UTS46')) { //Use the current punycode standard (appeared in PHP 7.2) - $punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_UTS46); + $punycode = idn_to_ascii( + $domain, + \IDNA_DEFAULT | \IDNA_USE_STD3_RULES | \IDNA_CHECK_BIDI | + \IDNA_CHECK_CONTEXTJ | \IDNA_NONTRANSITIONAL_TO_ASCII, + \INTL_IDNA_VARIANT_UTS46 + ); } elseif (defined('INTL_IDNA_VARIANT_2003')) { //Fall back to this old, deprecated/removed encoding $punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_2003); @@ -1508,12 +1529,7 @@ class PHPMailer && ini_get('mail.add_x_header') === '1' && stripos(PHP_OS, 'WIN') === 0 ) { - trigger_error( - 'Your version of PHP is affected by a bug that may result in corrupted messages.' . - ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . - ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', - E_USER_WARNING - ); + trigger_error($this->lang('buggy_php'), E_USER_WARNING); } try { @@ -1687,7 +1703,10 @@ class PHPMailer //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html //Example problem: https://www.drupal.org/node/1057954 - if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) { + + //PHP 5.6 workaround + $sendmail_from_value = ini_get('sendmail_from'); + if (empty($this->Sender) && !empty($sendmail_from_value)) { //PHP config has a sender address we can use $this->Sender = ini_get('sendmail_from'); } @@ -1724,7 +1743,7 @@ class PHPMailer fwrite($mail, $header); fwrite($mail, $body); $result = pclose($mail); - $addrinfo = static::parseAddresses($toAddr); + $addrinfo = static::parseAddresses($toAddr, true, $this->CharSet); $this->doCallback( ($result === 0), [[$addrinfo['address'], $addrinfo['name']]], @@ -1779,7 +1798,13 @@ class PHPMailer */ protected static function isShellSafe($string) { - //Future-proof + //It's not possible to use shell commands safely (which includes the mail() function) without escapeshellarg, + //but some hosting providers disable it, creating a security problem that we don't want to have to deal with, + //so we don't. + if (!function_exists('escapeshellarg') || !function_exists('escapeshellcmd')) { + return false; + } + if ( escapeshellcmd($string) !== $string || !in_array(escapeshellarg($string), ["'$string'", "\"$string\""]) @@ -1869,7 +1894,10 @@ class PHPMailer //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html //Example problem: https://www.drupal.org/node/1057954 //CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. - if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) { + + //PHP 5.6 workaround + $sendmail_from_value = ini_get('sendmail_from'); + if (empty($this->Sender) && !empty($sendmail_from_value)) { //PHP config has a sender address we can use $this->Sender = ini_get('sendmail_from'); } @@ -1884,7 +1912,7 @@ class PHPMailer if ($this->SingleTo && count($toArr) > 1) { foreach ($toArr as $toAddr) { $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); - $addrinfo = static::parseAddresses($toAddr); + $addrinfo = static::parseAddresses($toAddr, true, $this->CharSet); $this->doCallback( $result, [[$addrinfo['address'], $addrinfo['name']]], @@ -2133,7 +2161,8 @@ class PHPMailer } if ($tls) { if (!$this->smtp->startTLS()) { - throw new Exception($this->lang('connect_host')); + $message = $this->getSmtpErrorMessage('connect_host'); + throw new Exception($message); } //We must resend EHLO after TLS negotiation $this->smtp->hello($hello); @@ -2163,6 +2192,10 @@ class PHPMailer //As we've caught all exceptions, just report whatever the last one was if ($this->exceptions && null !== $lastexception) { throw $lastexception; + } elseif ($this->exceptions) { + // no exception was thrown, likely $this->smtp->connect() failed + $message = $this->getSmtpErrorMessage('connect_host'); + throw new Exception($message); } return false; @@ -2181,14 +2214,15 @@ class PHPMailer /** * Set the language for error messages. - * Returns false if it cannot load the language file. * The default language is English. * * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") - * @param string $lang_path Path to the language file directory, with trailing separator (slash).D + * Optionally, the language code can be enhanced with a 4-character + * script annotation and/or a 2-character country annotation. + * @param string $lang_path Path to the language file directory, with trailing separator (slash) * Do not set this from user input! * - * @return bool + * @return bool Returns true if the requested language was loaded, false otherwise. */ public function setLanguage($langcode = 'en', $lang_path = '') { @@ -2211,44 +2245,77 @@ class PHPMailer //Define full set of translatable strings in English $PHPMAILER_LANG = [ 'authenticate' => 'SMTP Error: Could not authenticate.', + 'buggy_php' => 'Your version of PHP is affected by a bug that may result in corrupted messages.' . + ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . + ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', 'data_not_accepted' => 'SMTP Error: data not accepted.', 'empty_message' => 'Message body empty', 'encoding' => 'Unknown encoding: ', 'execute' => 'Could not execute: ', + 'extension_missing' => 'Extension missing: ', 'file_access' => 'Could not access file: ', 'file_open' => 'File Error: Could not open file: ', 'from_failed' => 'The following From address failed: ', 'instantiate' => 'Could not instantiate mail function.', 'invalid_address' => 'Invalid address: ', + 'invalid_header' => 'Invalid header name or value', 'invalid_hostentry' => 'Invalid hostentry: ', 'invalid_host' => 'Invalid host: ', 'mailer_not_supported' => ' mailer is not supported.', 'provide_address' => 'You must provide at least one recipient email address.', 'recipients_failed' => 'SMTP Error: The following recipients failed: ', 'signing' => 'Signing Error: ', + 'smtp_code' => 'SMTP code: ', + 'smtp_code_ex' => 'Additional SMTP info: ', 'smtp_connect_failed' => 'SMTP connect() failed.', + 'smtp_detail' => 'Detail: ', 'smtp_error' => 'SMTP server error: ', 'variable_set' => 'Cannot set or reset variable: ', - 'extension_missing' => 'Extension missing: ', ]; if (empty($lang_path)) { //Calculate an absolute path so it can work if CWD is not here $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; } + //Validate $langcode - if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { + $foundlang = true; + $langcode = strtolower($langcode); + if ( + !preg_match('/^(?P[a-z]{2})(?P