In org.hibernate.resource.beans.container.internal.CdiBeanContainerBuilder#fromBeanManagerReference, we require the object to implement the deprecated org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager interface, even though we only need its parent interface, org.hibernate.resource.beans.container.spi.ExtendedBeanManager.
We should change that.
Same thing in org.hibernate.resource.beans.container.internal.CdiBeanContainerExtendedAccessImpl#CdiBeanContainerExtendedAccessImpl: the constructor should require a org.hibernate.resource.beans.container.spi.ExtendedBeanManager, not a org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager.
We should probably have tests with both the legacy and new interface, to check everything works fine... Currently we just have a test with the legacy interface (which extends the new one).
Note that we should still pass instances of org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager.LifecycleListener to the registerLifecycleListener() methods, so that everything works correctly when the object is a legacy implementation. I think that's where the confusion was and that's why we though we had to rely on the legacy ExtendedBeanManager interface.