# php 8.1 when will be available



## alfikmik (Dec 4, 2021)

I'm curious where i can check when php 8.1 will be available in ports


----------



## cmoerz (Dec 4, 2021)

That very much depends on the port maintainer. php ports appear to be managed by tz@; glancing at the port statistics, he's reasonably active.

Bottom line: there's multiple factors that will influence how fast it'll be ready:

how much time tz@ has available
how many changes will be required, i.e. starting from a lang/php80
how many issues arise during said porting/creation process
Unfortunately, porting isn't always a straightforward process of just downloading and running "install" to create a package.

If you feel, that it takes too long, you're obviously welcome to lend a hand and create a port patch yourself and submit it - though, admittedly that may not be an option for you. After all, I don't know whether your skills/time/etc. permit it. If you're interested, I'd be happy to share further pointers.


----------



## Alain De Vos (Dec 4, 2021)

There are still alot of errors when i use php80 for applications which rely on previous versions.


----------



## alfikmik (Dec 4, 2021)

Alain De Vos said:


> There are still alot of errors when i use php80 for applications which rely on previous versions.


PHP 8.0 have a lot of new things and a lot of deprecated features was removed ... so it's natural...  Please for future read question first. I know what difference is between 7.x and 8.0 and 8.1. I just wondering when 8.1 will be available in ports, not what kind of problems U have with 8.0 and legacy software.


----------



## alfikmik (Dec 4, 2021)

cmoerz said:


> That very much depends on the port maintainer. php ports appear to be managed by tz@; glancing at the port statistics, he's reasonably active.
> 
> ...
> 
> If you feel, that it takes too long, you're obviously welcome to lend a hand and create a port patch yourself and submit it - though, admittedly that may not be an option for you. After all, I don't know whether your skills/time/etc. permit it. If you're interested, I'd be happy to share further pointers.


Thans for reply, could U please, give an URL where i can track PHP port?


----------



## cmoerz (Dec 5, 2021)

Freshports is a good start - unfortunately, it only lets you track ports which already exist. Assuming there will be a lang/php81 in the future, I don't see any way to subscribe to that.

By contrast, here's PHP 8:





						FreshPorts -- lang/php80: PHP Scripting Language
					

PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.  Its syntax draws upon C, Java, and Perl, and is easy to learn.  The main goal of the language is to...




					www.freshports.org
				




If you're feeling fancy, you could write yourself a script that updates your /usr/ports directory and emails you once it detects php 8.1. Something along the lines of this (careful, this is untested):

```
#!/bin/sh
cd /usr/ports
git pull
if [ -e /usr/ports/lang/php81 ]; then
    mail myself@company.com << EOF
PHP 8.1 is available now!
EOF
fi
```


----------



## eternal_noob (Dec 5, 2021)

alfikmik said:


> give an URL where i can track PHP port?


Maybe check the mailing lists. https://www.freebsd.org/community/mailinglists/


----------



## T-Daemon (Dec 5, 2021)

cmoerz said:


> Freshports is a good start - unfortunately, it only lets you track ports which already exist.





alfikmik said:


> ,,, an URL where i can track PHP port?


You could subscribe to Freshports RSS feed. The RSS feed can be limited to show only new ports (PHP 8.1 port would be a new port, lang/php81 for example). For details see "flavor=new" in






						Newsfeeds
					

FreshPorts - new ports, applications




					www.freshports.org


----------



## alfikmik (Dec 6, 2021)

cmoerz said:


> ```
> #!/bin/sh
> cd /usr/ports
> git pull
> ...



maybe simplier:



```
#!/usr/bin/env bash
portsnap --interactive fetch update && [[ -e /usr/ports/lang/php81 ]] && ( echo "PHP 8.1 is available" | mail user@domain )
```


----------



## jmos (Dec 29, 2021)

PHP 8.1.1 arrived in the ports tree  

Note: devel/php-composer and textproc/php81-xmlreader are buggy here, I've already wrote a bugreport…


----------



## CyberCr33p (Dec 29, 2021)

Can you post the link for the bug report?


----------



## cmoerz (Dec 29, 2021)

Might be that one?





						260774 – Add php81 to the tree
					






					bugs.freebsd.org


----------



## CyberCr33p (Dec 29, 2021)

Don't think it's related. Maybe jmos didn't submit it (sometimes bugs.freebsd.org lags and maybe it's not submitted).


----------



## jmos (Dec 29, 2021)

CyberCr33p said:


> Can you post the link for the bug report?


No, because I wrote an email to the maintainer. But bug 260774 and its attachment / patch 230515 may solve my problems (won't start the compiler today again - was a long day).

Edit: The patch works.


----------



## rafael_grether (Dec 30, 2021)

I already have problems with some applications running under PHP 8, so I think it's too soon to install PHP 8.1 in production environment.


----------



## jmos (Dec 31, 2021)

I would use PHP 8.1 in a production environment, but as there's only 7.4 available…

But I never had only a production environment - every live system has its development environment, and there I want to read warnings, deprecation notices etc.; So of course I want to install the newest PHP version on my local machines. Always. Just to be prepared for future server updates. Reading changelogs is of course mandatory (PHP offers great documents for upgrading your code).

I never had any problem to get my web-apps / websites and scripts up to the newest PHP version while running the same code on the live system with older PHP versions for many, many years now, and it never costs me much time to update my code (the only big one was the change from the old MySQL extension to the actual MySQLi - must been around 2015; creepy stuff like "register_globals" I've never used - even in times other did (but I had to deal with such code)). Already fixed a really huge project to be 8.1 ready 

But if you're using third party PHP code: In this case I would check the informations provided by the developers - they should know if PHP 8.1 is usable or not.


----------



## CyberCr33p (Dec 31, 2021)

You can use jails to run different versions of PHP.


----------

